Use a shortened dir path for window title

Also respect named directories
This commit is contained in:
Kovid Goyal
2021-07-16 17:49:21 +05:30
parent 2245d4506f
commit f4b3948168

View File

@@ -72,8 +72,9 @@
if [[ "$_ksi_prompt[state]" == "first-run" ]]; then if [[ "$_ksi_prompt[state]" == "first-run" ]]; then
_ksi_install_completion _ksi_install_completion
fi fi
# Set kitty window title to the cwd # Set kitty window title to the cwd, appropriately shortened, see
_ksi_set_title "${PWD/$HOME/~}" # https://unix.stackexchange.com/questions/273529/shorten-path-in-zsh-prompt
_ksi_set_title $(print -P '%(4~|…/%3~|%~)')
# Prompt marking # Prompt marking
if [[ "$_ksi_prompt[mark]" == "y" ]]; then if [[ "$_ksi_prompt[mark]" == "y" ]]; then