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 b204dd5363
commit 167cd2fc32
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C

View file

@ -84,7 +84,8 @@ in
stty erase '^?'
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