diff options
author | xyz <gky44px1999@gmail.com> | 2021-05-11 20:09:45 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-05-11 20:09:45 -0700 |
commit | 3b336a3b653de8a8eeb707b3977f38600a0fce0f (patch) | |
tree | e142269ca3db1b8e1c726376653df68f42915e9f | |
parent | 68b29088b293b878ab5d47676c70b231991bac0d (diff) |
fix PS1 for better line wrap
-rw-r--r-- | .bashrc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -11,7 +11,8 @@ # 0: not bold, 91: bright red # \e[m act like \e[0m, means reset so commands after it will not be colored # https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit -PS1='\e[0;91m[\u@\h \W]\$ \e[0m' +# need \[ and \] around color codes so bash ignore color codes when calculating line wraps +PS1='\[\e[0;91m\][\u@\h \W]\$ \[\e[0m\]' alias ls='ls --color=auto' alias ll='ls -lah --color=auto' |