diff --git a/cli/.config/zsh/prompt.zsh b/cli/.config/zsh/prompt.zsh index 8149325..af4b8eb 100644 --- a/cli/.config/zsh/prompt.zsh +++ b/cli/.config/zsh/prompt.zsh @@ -35,6 +35,11 @@ prompt.set_bang() { prompt_symbols[bang]=$1 } +precmd.window_title() { + typeset dir=$(pwd) + printf '\033]0;%s:%s\007' ${HOST%%.*} ${dir##*/} +} + precmd.is_git_repo() { typeset prompt_git_dir prompt_git_dir=$(git rev-parse --git-dir 2>/dev/null) || return 1 @@ -132,10 +137,6 @@ precmd.prompt.update() { zle && zle reset-prompt } -precmd.window_title() { - printf '\033]0;%s %s\007' ${HOST%%.*} $(pwd) -} - precmd() { precmd.window_title if precmd.is_git_repo; then