curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: Feedback wanted: bold headers? (Daniel Stenberg et al)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 29 Apr 2018 23:49:01 +0200 (CEST)

On Sun, 29 Apr 2018, Timothe Litt wrote:

> I'm not sure - it seems like feature overload.  But maybe.  It's a step down
> a path away from a pure command line tool; you shouldn't take it without a
> clear view of the end state.

I've never had a clear view of that before but that doesn't usually stop me. I
don't even think there *is* an end state for curl. It's a journey that never
ends.

> Use termcap.  Or (n)curses.  Don't hardcode even the ANSI bold controls.

That would be taking things (much) further than I'd be comfortable with.

> Make sure that you don't break copy and paste.

How would I break or not break that?

> Do you want curl to have a GUI?

No.

> If not, for a trivial alternative to the initial proposal, use this:
>
> 2>&1 curl -v http://www.spamhaus.org/drop/dropv6.txt | \
> sed -e's/^< \([A-Z}[A-Za-z-]*:\)/< \x1b[1m\1\x1b[m/' | less -R

Of course that breaks in 22 different ways when you add other factors in. But
sure, that works for the simple use case.

> Taking my own advice to use termcap results in:

I'd find that to be a too huge penalty for just doing bold escape codes.

-- 
  / daniel.haxx.se

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-04-29