From cb12222811192ef76c2f6d19eb3715165d94b547 Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Thu, 4 Feb 2016 15:08:22 -0500 Subject: [PATCH] use 'command git' in prompts Fixes Zim issue with interation with any functions or aliases that wrap 'git'. See issue #30 for more information. --- modules/prompt/themes/eriner.zsh-theme | 2 +- modules/prompt/themes/minimal.zsh-theme | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/prompt/themes/eriner.zsh-theme b/modules/prompt/themes/eriner.zsh-theme index d962d16..302eaf6 100644 --- a/modules/prompt/themes/eriner.zsh-theme +++ b/modules/prompt/themes/eriner.zsh-theme @@ -76,7 +76,7 @@ prompt_context() { prompt_git() { local color ref is_dirty() { - test -n "$(git status --porcelain --ignore-submodules)" + test -n "$(command git status --porcelain --ignore-submodules)" } ref=${vcs_info_msg_0_} if [[ -n ${ref} ]]; then diff --git a/modules/prompt/themes/minimal.zsh-theme b/modules/prompt/themes/minimal.zsh-theme index 3c368ee..839a790 100644 --- a/modules/prompt/themes/minimal.zsh-theme +++ b/modules/prompt/themes/minimal.zsh-theme @@ -41,12 +41,12 @@ minimal_path() { } git_branch_name() { - local branch_name="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" + local branch_name="$(command git rev-parse --abbrev-ref HEAD 2> /dev/null)" [[ -n $branch_name ]] && print "$branch_name" } git_repo_status(){ - local rs="$(git status --porcelain -b)" + local rs="$(command git status --porcelain -b)" if $(print "$rs" | grep -v '^##' &> /dev/null); then # is dirty print "%F{red}"