Shell Prompt Line Wrapping Issue

前端 未结 9 2073
一生所求
一生所求 2021-01-30 03:30

I\'ve done something to break my Bash Shell Prompt in OS X (10.5.7) Terminal.

This is the PS1 that I had configured:

PS1=\'\\[\\e[1;32m\\]\\h\\[\\e[0m\\]         


        
9条回答
  •  渐次进展
    2021-01-30 03:59

    For future reference, this is what I use:

    export PS1="\[\033[0;31m\][\u@Project:\w]$\[\033[0m\] "

    This would display my shell prompt as:

    [ec2-user@Project:~]$

    Helps me distinguish between live and dev sites.

提交回复
热议问题