Improve terminal pwd title by shortening home to ~

This commit is contained in:
Benjamin Bädorf 2022-04-30 18:27:42 +02:00
parent 88ee3fe4c7
commit 84fa70513f
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C

View file

@ -84,7 +84,8 @@ in
stty erase '^?' stty erase '^?'
precmd () { precmd () {
echo -e "\e]2;$(pwd)\e\\" DIR_NAME=$(pwd | sed "s|^$HOME|~|g")
echo -e "\e]2;$DIR_NAME\e\\"
} }
# If a command is not found, show me where it is # If a command is not found, show me where it is