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\] "