bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: no TIPS on COLORS in the PROMPT in the DOCS


From: Dan Jacobson
Subject: Re: no TIPS on COLORS in the PROMPT in the DOCS
Date: 19 Apr 2001 04:47:15 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

in /usr/share/doc/bash-doc-2.04/article.txt it says

5.1.  New Features in Bash-1.14

     The new features available in Bash-1.14 answer  several
of the most common requests for enhancements.  Most notably,
there is a mechanism  for  including  non-visible  character
sequences  in  prompts, such as those which cause a terminal
to print characters in different colors or in standout mode.
There  was  nothing preventing the use of these sequences in
earlier  versions,  but  the  readline  redisplay  algorithm
assumed  each  character  occupied physical screen space and
would wrap lines prematurely.
----------
But I'm already having lots of kinds of mishaps with say, C-a on long
lines, and I just know one day I'm gonna do a big boo boo due to
driving with an incorrect view of what I've got on the command line.

Anybody know how I can fool bash into thinking that these escape
sequences take up zero space?

case z-$TERM in z-rxvt) my_color_on="\e[01;35m" my_color_off="\e[00m"
test `id -u` = 0 && my_color_on="\e[01;45m";;esac
#don't export the color stuff though

Maybe bash should have a pair of \escape \sequences that tell it that
the characters in between don't count toward prompt width...

Bash 2.04
-- 
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]