From a844454a655cfaf75e5fe7da7a23a1ca8e226035 Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Wed, 15 Mar 2017 09:36:02 -0500 Subject: [PATCH] Remove undocumented git-info configuration `prompt.showinfo` for enabling or disabling it globally or per repository. It can be globally disabled by not loading the `git-info` module at all, and prompts currently will not break (and in the future should still not break) if the module is not loaded. This removes one git call that is used to check for the `prompt.showinfo` configuration value. --- modules/git-info/init.zsh | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/modules/git-info/init.zsh b/modules/git-info/init.zsh index e410ab4..9043208 100644 --- a/modules/git-info/init.zsh +++ b/modules/git-info/init.zsh @@ -100,22 +100,6 @@ git-info() { return 1 fi - if (( $# )); then - if [[ $1 == [Oo][Nn] ]]; then - git config --bool prompt.showinfo true - elif [[ $1 == [Oo][Ff][Ff] ]]; then - git config --bool prompt.showinfo false - else - print "usage: $0 [ on | off ]" >&2 - fi - return 0 - fi - - # Return if git-info is disabled. - if ! is-true ${$(git config --bool prompt.showinfo):-true}; then - return 1 - fi - # Ignore submodule status. local ignore_submodules zstyle -s ':zim:git-info' ignore-submodules 'ignore_submodules' || ignore_submodules='all'