From 8191abdd16fdb8dc7d8641a9391709e1c620b59d Mon Sep 17 00:00:00 2001 From: Pinghao Wu Date: Sat, 2 Mar 2024 23:57:58 +0800 Subject: [PATCH] bash: prompt: use trimmed pwd --- .bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 385fe28..116c73e 100644 --- a/.bashrc +++ b/.bashrc @@ -127,8 +127,9 @@ while [ -n "$LVLSTR" ];do esac LVLSTR=${LVLSTR#?} done -PS1="\[\e]133;A\e\\\\\]\[\e[01;32m\]\u@\h${ABDUCO_SESSION:+>$ABDUCO_SESSION}${STY:+>${STY#*\.}} \[\e[01;34m\]\W\[\e[31m\]\${?#0}\[\e[0m\]\\$ " +PS1="\[\e]133;A\e\\\\\]\[\e[01;32m\]\u@\h${ABDUCO_SESSION:+>$ABDUCO_SESSION}${STY:+>${STY#*\.}} \[\e[01;34m\]\w\[\e[31m\]\${?#0}\[\e[0m\]\\$ " PS1="\[\e]2;$PS1AO\u@\h${ABDUCO_SESSION:+>$ABDUCO_SESSION}${STY:+>${STY#*\.}} \w\e\\\\\]$PS1A\[\e[0m\]$PS1" +PROMPT_DIRTRIM=2 export PTERM alias rssh="command ssh" alias ssh="env TERM=$PTERM ssh" -- 2.43.0