Skip to content

Commit

Permalink
disable caching by default
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierverdier committed Sep 2, 2014
1 parent 5c06cf3 commit 3261da4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Install
# an example prompt
PROMPT='%B%m%~%b$(git_super_status) %# '

#. You may also redefine the function ``git_super_status`` (after the ``source`` statement) to adapt it to your needs (to change the order in which the information is displayed). Define the variable ``ZSH_THEME_GIT_PROMPT_NOCACHE`` in order to disable caching. You may also change a number of variables (which name start with ``ZSH_THEME_GIT_PROMPT_``) to change the appearance of the prompt. Take a look in the file ``zshrc.sh`` to see how the function ``git_super_status`` is defined, and what variables are available.
#. You may also redefine the function ``git_super_status`` (after the ``source`` statement) to adapt it to your needs (to change the order in which the information is displayed). Define the variable ``ZSH_THEME_GIT_PROMPT_CACHE`` in order to enable caching. You may also change a number of variables (which name start with ``ZSH_THEME_GIT_PROMPT_``) to change the appearance of the prompt. Take a look in the file ``zshrc.sh`` to see how the function ``git_super_status`` is defined, and what variables are available.
#. Go in a git repository and test it!

**Enjoy!**
2 changes: 1 addition & 1 deletion zshrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function preexec_update_git_vars() {
}

function precmd_update_git_vars() {
if [ -n "$__EXECUTED_GIT_COMMAND" ] || [ -n "$ZSH_THEME_GIT_PROMPT_NOCACHE" ]; then
if [ -n "$__EXECUTED_GIT_COMMAND" ] || [ ! -n "$ZSH_THEME_GIT_PROMPT_CACHE" ]; then
update_current_git_vars
unset __EXECUTED_GIT_COMMAND
fi
Expand Down

0 comments on commit 3261da4

Please sign in to comment.