Shell Prompt Line Wrapping Issue

前端 未结 9 1960
一生所求
一生所求 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:44

    This stackoverflow thread seems relevant. As someone noted in that thread, the Bash FAQ at mywiki.wooledge.org discusses how to properly quote color codes in Bash prompts (FAQ 53), and the proper invocation of terminal colors (FAQ 37).

提交回复
热议问题