feat(zsh): set window title to git repo url basename if available

main
mandlm 2022-09-01 08:21:09 +02:00
parent 34c54c5bf4
commit a73a5a7df0
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ in
initExtra = ''
function set_win_title(){
echo -ne "\033]0; $(basename "$PWD") \007"
local TITLE=$(git config --get remote.origin.url || echo "$PWD")
echo -ne "\033]0; $(basename "$TITLE") \007"
}
precmd_functions+=(set_win_title)