Article View: gnu.bash.bug
Article #1011non-printing chars in prompt
From: perf
Date: Mon, 12 Jun 1989 22:01
Date: Mon, 12 Jun 1989 22:01
34 lines
1983 bytes
1983 bytes
Facts: bash 0.99
sun 3/50
SunOS 4.0.1
xterm
I tried to use the \<octal> notation to get standout mode in my
prompt. (I suppose thats why the possibility is there?).
Anyway, the shell treats the 7 bytes (4 bytes to turn on and 3 to turn
off standout mode) as printing characters, which means that the cursor
goes to the wrong place sometimes. (When moving around in multiline
commands or using i-search for example).
This is probably not a bug since it is difficult to know which
characters can be printed on a specific terminal.
My suggestion is this (borrowed from tcsh): add two more special
characters in the prompt to start and stop standout mode. The chars to
use could either be ansi (\033[7m to turn it on and \033[m to turn it
off) or they could be specified in ~/.inputrc. Tcsh uses %S and %s for
this, but 's' is occupied. What about \R and \r (for reverse). These
codes should always be treated as non-printing and not affect the
cursor-position.
If this isn't to hard to hack into bash, I think if would help
tcsh-users to feel at home (and make them switch to bash).
/Per
____________________________________________________________________________
| Per Foreby -- system manager at School | Email: perf@efd.lth.se |
| of Electrical Engineering, Computer | Snail: Tekniska Hogskolan i Lund, |
| Science and Engineering Physics, | Box 118, S-221 00 LUND, Sweden |
| Lund Institute of Technology, Sweden | Phone: int + 46 46-10 75 98 |
|________________________________________|___________________________________|
Technical Details
Message-ID:
<8906122201.AA01273@osiris.efd.lth.se>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!efd.lth.se!perfShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!efd.lth.se!perf From: perf@efd.lth.se Newsgroups: gnu.bash.bug Subject: non-printing chars in prompt Message-ID: <8906122201.AA01273@osiris.efd.lth.se> Date: 12 Jun 89 22:01:04 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 34