summaryrefslogtreecommitdiff
path: root/config/essentials/zsh/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'config/essentials/zsh/.zshrc')
-rw-r--r--config/essentials/zsh/.zshrc12
1 files changed, 6 insertions, 6 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index d8675d4..eeb4439 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -5,9 +5,9 @@ then
clear
if [ "/dev/tty1" = "$TTY" ]
then
- startw > /dev/null 2>&1
+ exec startw > /dev/null 2>&1
else
- startx > /dev/null 2>&1
+ exec startx > /dev/null 2>&1
fi
exit
fi
@@ -89,7 +89,7 @@ rehash_precmd() {
# window title hooks
add-zsh-hook -Uz precmd rehash_precmd
set_wt_action () {
- print -Pn '\e]0;$1\a'
+ print -Pn "\e]0;$1\a\033[0m"
}
add-zsh-hook -Uz preexec set_wt_action
set_wt () {
@@ -121,13 +121,13 @@ RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(par
setopt prompt_subst
parse_git_remote() {
- b="$(git branch -v 2> /dev/null | grep "^*" | sed 's/.\+\[\([^ ]\+\).*$/\1/')"
+ b="$(git branch -v 2>/dev/null | grep "^*" | cut -f2 -d'[' | cut -f1 -d' ')"
if [ "$b" = "behind" ]
then
- echo -n "↓ "
+ printf "↓ "
elif [ "$b" = "ahead" ]
then
- echo -n "↑ "
+ printf "↑ "
fi
}
parse_git_branch() {