diff options
| author | Maciej Sobkowski <maciejjo@maciejjo.pl> | 2016-06-16 14:50:01 +0200 |
|---|---|---|
| committer | Maciej Sobkowski <maciejjo@maciejjo.pl> | 2016-06-16 14:50:01 +0200 |
| commit | 5538c6763df18be785eff95acf3fbd1806f18419 (patch) | |
| tree | 9fa0aaa0a37a33c38b56aa6a225a29325eedbcb8 | |
| parent | 2cff2bccd3a3fbf1247dc711a6e306f20ab7fbe6 (diff) | |
bash: Modify PS1 to fix line wrapping
Escape sequences in PS1 need to be enclosed in square brackets,
otherewise lines break in wrong places and overlap each other.
| -rw-r--r-- | bash/.bashrc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/.bashrc b/bash/.bashrc index eb3e82c..3bdb49a 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -141,7 +141,7 @@ jobscount() { prompt_color() { - PS1="${BLUE}[${GREEN}\t${BLUE}][${YELLOW}\u${GREY}@${PURPLE}\h${GREY}:${CYAN}\W${BLUE}][${RED}\j${BLUE}]${BROWN}$P${PS_CLEAR} " + PS1="\\[\[${BLUE}\][\[${GREEN}\]\t\[${BLUE}\]][\[${COLOR1}\]\u\[${LIGHTGRAY}\]@\[${COLOR2}\]\h\[${LIGHTGRAY}\]:\[${CYAN}\]\W\[${BLUE}\]][\[${RED}\]\j\[${BLUE}\]]\[${GREEN}\]${P}\[${PS_CLEAR}\] " PS2="${P} " } |
