summaryrefslogtreecommitdiff
path: root/home/xyz
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-11-01 01:40:45 -0700
committerxyz <gky44px1999@gmail.com>2021-11-01 01:40:45 -0700
commite7a3d742adf3f39958eae2013bcc4d8ccc2d31d3 (patch)
tree1b1d7c08d4139896ff9224d0640789d8a8125cdd /home/xyz
parenta01ad1a028e0aceaf9d7534f21551caf0972185c (diff)
.bashrc, PS1 tput also need \[ and \] around color code!
Diffstat (limited to 'home/xyz')
-rw-r--r--home/xyz/.bashrc3
1 files changed, 2 insertions, 1 deletions
diff --git a/home/xyz/.bashrc b/home/xyz/.bashrc
index 08239853..ef8ae9a0 100644
--- a/home/xyz/.bashrc
+++ b/home/xyz/.bashrc
@@ -26,8 +26,9 @@ esac
#PS1='\[\033[0;91m\][\u@\h \W]\$ \[\033[0m\]'
# tput is better for different terminals?
+# but also need \[ and \] around color code!
# setaf and sgr0 see `man terminfo`
-PS1="$(tput setaf 1)[\u@\h \W]\$ $(tput sgr0)"
+PS1="\[$(tput setaf 1)\][\u@\h \W]\$ \[$(tput sgr0)\]"
# https://github.com/LukeSmithxyz/voidrice/blob/master/.config/shell/aliasrc
for cmd in iotop nethogs hardcode-fixer ventoy; do