When I write a long command and the line of text gets to end of terminal, it continues at beginning the same line (as if it was "overwriting it), and if I hit home it doesn't really go to the beginning of the line.
I've found this question, this other, etc., and I now it is related with the colors and things I want it to display... and I am so sorry to open another post, but I tried to edit the line myself but I can't really get it ok. Can yo guys give me some help?
Here is the extract from my .bashrc:
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u@debian]\[\033[01;34m\][\033[01;34m\]\w\]]\033[01;34m\]\$\033[00m\] '
To clarify it, I want the prompt to be:
[username@debian][~]$
- Meaning, username@debian between brackets
[\u@debian], in green color
*Yes, I want it to display "debian", not usual \h
- Working directory also between its brackets
[\w], in blue color - The
$of normal user - And the text I type to be displayed in white colour.
- I don't care about root user's prompt.
Thanks for the help, and again, sorry to open another post for this...
Edit: I tried to rewrite it after slowly reading this full tutorial. But wasn't able to make it work. Now it doesn't "overwrite" the first line, but on the second, after a few characters, overwrites that second line for just a few characters, then continues ok. But with this new PS1, if I hit the UP arrow on the keyboard to previous commands, it gets really funky.
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\[[\]\u\[@debian]\]\[\033[01;34m\]\[[\]\w\[]\]\[\033[01;34m\]\$\[\033[00m\] '
If I didn't get wrong the tutorial, it is supposed to be:
\[Begin a sequence of non-printing characters.\]end the sequence of non-printing characters.\033[XXmcolor, that needed to be between the start and end of non-printing characters, so, for example, for color blue (34) it should be:\[\033[34m\]
So, in my mind, it should work now, but it doesn't. Clearly I'm not seeing it right -.-