Cedric Staniewski wrote:
Dan McGee wrote:
On Thu, Oct 22, 2009 at 8:50 PM, Allan McRae <[email protected]> wrote:
Dan McGee wrote:
On Thu, Oct 22, 2009 at 7:41 PM, Allan McRae <[email protected]> wrote:

Cedric Staniewski wrote:

Suggested-by: Dan McGee <[email protected]>
Signed-off-by: Cedric Staniewski <[email protected]>
---

I do not know if this patch is usefull at all, because I do not notice
any
change. Just grabbed this from Dan's TODO list and wanted to play a bit
with tput.


It looks fine to me...
I just have no idea on the advantage we are achieving with this change
apart
from the apparent terminal safeness.  Was the old version not safe?

Dan: comments?

First comment- that TODO list is still huge, wow. :)

Anyway, this seems pretty reasonable to me, but not sure it is worth
it. At the least, we should capture these sequences once on script
startup, and then use the global variable in each function. And does
$(tput offbold) make more sense for the reset?

There does not appear to be such a thing as "tput offbold".
You are quite right, I just read the manpage wrong:
       bold=`tput smso` offbol...@tput@ rmso`
            Set the shell variables bold, to begin stand-out mode
sequence, and offbold, to end standout mode  sequence,  for  the
current
            terminal.  This might be followed by a prompt: echo
"${bold}Please type in your name: ${offbold}\c"


Just for the record, the capability names can be found at the terminfo manpage. 
The tput manpage was not that helpful in this context.
By the way, the example you quoted does not work as I expected for me; it does 
not bold the text, but changes the background color to grey.
It does the same for me in XFCE terminal. Aparently urxvt works with the example...

Allan


Reply via email to