summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/essentials/zsh/.zshrc4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index afe1eb6..6fc601c 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -83,6 +83,10 @@ add-zsh-hook -Uz precmd rehash_precmd
PS1=' %B%(#.%F{1}.%F{13})[%n%b%f@%B%F{6}%m]%b%f %3~ '
RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(parse_git_branch)%f%(?.. %?)'
+precmd () {
+ print -Pn "\e]0;$USER@$HOST on ${PWD//$HOME/\~}\a"
+}
+
setopt prompt_subst
parse_git_remote() {
b="$(git branch -v 2> /dev/null | grep "^*" | sed 's/.\+\[\([^ ]\+\).*$/\1/')"