From 40b7eb9963e056c7f52560a3cb09bd2cef50a1c6 Mon Sep 17 00:00:00 2001 From: Douglas Creager Date: Tue, 29 Jan 2013 09:21:49 -0500 Subject: [PATCH] Use upstream git completion but oh-my-zsh prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gitfast plugin lets you use the faster upstream zsh completion macros. Before, it would also force you into using the upstream prompt expressions. I want to be able to choose which of the two upstream bits to use — I want upstream completion but oh-my-zsh prompts, for instance. --- plugins/gitfast/gitfast.plugin.zsh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/gitfast/gitfast.plugin.zsh b/plugins/gitfast/gitfast.plugin.zsh index 7e50cf721..81e51baf7 100644 --- a/plugins/gitfast/gitfast.plugin.zsh +++ b/plugins/gitfast/gitfast.plugin.zsh @@ -1,7 +1,10 @@ dir=$(dirname $0) source $dir/../git/git.plugin.zsh -source $dir/git-prompt.sh -function git_prompt_info() { - __git_ps1 "${ZSH_THEME_GIT_PROMPT_PREFIX//\%/%%}%s${ZSH_THEME_GIT_PROMPT_SUFFIX//\%/%%}" -} +if [ -z "$GITFAST_USE_OHMYZSH_PROMPT" ]; then + source $dir/git-prompt.sh + + function git_prompt_info() { + __git_ps1 "${ZSH_THEME_GIT_PROMPT_PREFIX//\%/%%}%s${ZSH_THEME_GIT_PROMPT_SUFFIX//\%/%%}" + } +fi