aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.zshrc8
1 files changed, 7 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc
index 0436ad1..2bc8b70 100644
--- a/.zshrc
+++ b/.zshrc
@@ -219,6 +219,7 @@ bindkey "^U" backward-kill-line
# C-j To go to the parent directory.
function __cd_parent_dir() {
pushd .. > /dev/null
+ __update_vcs_info
zle reset-prompt
}
zle -N __cd_parent_dir
@@ -227,6 +228,7 @@ bindkey "^J" __cd_parent_dir
# C-o To go to the previous directory.
function __cd_prev_dir() {
popd > /dev/null
+ __update_vcs_info
zle reset-prompt
}
zle -N __cd_prev_dir
@@ -257,7 +259,7 @@ zstyle ':vcs_info:*' formats " (%b)%u"
zstyle ':vcs_info:*' actionformats ' (%b %a)%u'
-function precmd() {
+function __update_vcs_info() {
psvar=()
LANG=en_US.UTF-8 vcs_info
if [[ -n "$vcs_info_msg_0_" ]]; then
@@ -265,6 +267,10 @@ function precmd() {
fi
}
+function precmd() {
+ __update_vcs_info
+}
+
PROMPT="