use 'command git' in prompts
Fixes Zim issue with interation with any functions or aliases that wrap 'git'. See issue #30 for more information.
This commit is contained in:
parent
9075729ac3
commit
cb12222811
@ -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
|
||||
|
@ -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}"
|
||||
|
Reference in New Issue
Block a user