bug-bash
[Top][All Lists]
Advanced

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

Re: Interactive wrapping problem


From: Francis Litterio
Subject: Re: Interactive wrapping problem
Date: Sun, 03 Aug 2003 18:42:13 -0400
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt)

Tim Waugh wrote:

> Repeat-By:
>       $ export PS1="\e[1;38mTextHereDoesNotMatter>\e[0m "
>
>       Type any long command, the problem shows up as the command is
>       typed in.

You need to tell bash that PS1 contains characters that take up no space
on-screen.  From the bash man page:

> PROMPTING
...
>     Bash allows these prompt strings to be customized by inserting a
>     number of backslash-escaped special characters that are decoded as
>     follows:
...
>            \[     begin a sequence of non-printing characters, which  could
>                   be  used  to  embed  a terminal control sequence into the
>                   prompt
>            \]     end a sequence of non-printing characters

Try doing this:

        export PS1="\[\e[1;38m\]TextHereDoesNotMatter>\[\e[0m\] "





reply via email to

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