Skip to content

Commit 73f6906

Browse files
committed
global(git): Specify core.fsmonitor=
1 parent 39fc399 commit 73f6906

File tree

12 files changed

+79
-74
lines changed

12 files changed

+79
-74
lines changed

completions/gh.completion.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ EOF
322322
format=${format//\p/\2}
323323
format=${format//\o/\3}
324324
fi
325-
command git config --get-regexp 'remote\.[^.]*\.url' |
325+
_omb_command_git config --get-regexp 'remote\.[^.]*\.url' |
326326
grep -E ' ((https?|git)://|git@)github\.com[:/][^:/]+/[^/]+$' |
327327
sed -E 's#^remote\.([^.]+)\.url +.+[:/](([^/]+)/[^.]+)(\.git)?$#'"$format"'#'
328328
}
@@ -332,12 +332,12 @@ EOF
332332
function __hub_heads {
333333
local i remote repo branch dir=$(__gitdir)
334334
if [ -d "$dir" ]; then
335-
command git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
335+
_omb_command_git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
336336
"refs/heads/"
337337
for i in $(__hub_github_repos); do
338338
remote=${i%%:*}
339339
repo=${i#*:}
340-
command git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
340+
_omb_command_git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
341341
"refs/remotes/${remote}/" | while read branch; do
342342
echo "${repo}:${branch#${remote}/}"
343343
done
@@ -351,11 +351,11 @@ EOF
351351
function __hub_revlist {
352352
local i remote=${1:-origin} dir=$(__gitdir)
353353
if [ -d "$dir" ]; then
354-
command git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
354+
_omb_command_git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
355355
"refs/remotes/${remote}/" | while read i; do
356356
echo "${i#${remote}/}"
357357
done
358-
command git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
358+
_omb_command_git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
359359
"refs/tags/"
360360
fi
361361
}

completions/hub.completion.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ EOF
324324
format=${format//\p/\2}
325325
format=${format//\o/\3}
326326
fi
327-
command git config --get-regexp 'remote\.[^.]*\.url' |
327+
_omb_command_git config --get-regexp 'remote\.[^.]*\.url' |
328328
grep -E ' ((https?|git)://|git@)github\.com[:/][^:/]+/[^/]+$' |
329329
sed -E 's#^remote\.([^.]+)\.url +.+[:/](([^/]+)/[^.]+)(\.git)?$#'"$format"'#'
330330
}
@@ -334,12 +334,12 @@ EOF
334334
function __hub_heads {
335335
local i remote repo branch dir=$(__gitdir)
336336
if [ -d "$dir" ]; then
337-
command git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
337+
_omb_command_git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
338338
"refs/heads/"
339339
for i in $(__hub_github_repos); do
340340
remote=${i%%:*}
341341
repo=${i#*:}
342-
command git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
342+
_omb_command_git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
343343
"refs/remotes/${remote}/" | while read branch; do
344344
echo "${repo}:${branch#${remote}/}"
345345
done
@@ -353,11 +353,11 @@ EOF
353353
function __hub_revlist {
354354
local i remote=${1:-origin} dir=$(__gitdir)
355355
if [ -d "$dir" ]; then
356-
command git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
356+
_omb_command_git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
357357
"refs/remotes/${remote}/" | while read i; do
358358
echo "${i#${remote}/}"
359359
done
360-
command git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
360+
_omb_command_git --git-dir="$dir" for-each-ref --format='%(refname:short)' \
361361
"refs/tags/"
362362
fi
363363
}

lib/git.sh

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
# Outputs current branch info in prompt format
33

44
_omb_module_require lib:omb-prompt-colors
5+
_omb_module_require lib:omb-prompt-base
56

67
# # Note: The same name of a functionis defined in omb-prompt-base. We comment
78
# # out this function for now.
89
# function git_prompt_info() {
910
# local ref
10-
# if [[ "$(command git config --get oh-my-bash.hide-status 2>/dev/null)" != "1" ]]; then
11-
# ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
12-
# ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0
11+
# if [[ "$(_omb_command_git config --get oh-my-bash.hide-status 2>/dev/null)" != "1" ]]; then
12+
# ref=$(_omb_command_git symbolic-ref HEAD 2> /dev/null) || \
13+
# ref=$(_omb_command_git rev-parse --short HEAD 2> /dev/null) || return 0
1314
# echo "$OSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$OSH_THEME_GIT_PROMPT_SUFFIX"
1415
# fi
1516
# }
@@ -19,14 +20,14 @@ function parse_git_dirty() {
1920
local STATUS=''
2021
local FLAGS
2122
FLAGS=('--porcelain')
22-
if [[ "$(command git config --get oh-my-bash.hide-dirty)" != "1" ]]; then
23+
if [[ "$(_omb_command_git config --get oh-my-bash.hide-dirty)" != "1" ]]; then
2324
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
2425
FLAGS+=( '--ignore-submodules=dirty' )
2526
fi
2627
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
2728
FLAGS+=( '--untracked-files=no' )
2829
fi
29-
STATUS=$(command git status "${FLAGS[@]}" 2> /dev/null | tail -n1)
30+
STATUS=$(_omb_command_git status "${FLAGS[@]}" 2> /dev/null | tail -n1)
3031
fi
3132
if [[ -n $STATUS ]]; then
3233
echo "$OSH_THEME_GIT_PROMPT_DIRTY"
@@ -38,11 +39,11 @@ function parse_git_dirty() {
3839
# Gets the difference between the local and remote branches
3940
function git_remote_status() {
4041
local remote ahead behind git_remote_status git_remote_status_detailed git_remote_origin
41-
git_remote_origin=$(command git rev-parse --verify ${hook_com[branch]}@{upstream} --symbolic-full-name 2>/dev/null)
42+
git_remote_origin=$(_omb_command_git rev-parse --verify ${hook_com[branch]}@{upstream} --symbolic-full-name 2>/dev/null)
4243
remote=${git_remote_origin/refs\/remotes\//}
4344
if [[ -n ${remote} ]]; then
44-
ahead=$(command git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
45-
behind=$(command git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)
45+
ahead=$(_omb_command_git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
46+
behind=$(_omb_command_git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)
4647

4748
if [[ $ahead -eq 0 ]] && [[ $behind -eq 0 ]]; then
4849
git_remote_status="$OSH_THEME_GIT_PROMPT_EQUAL_REMOTE"
@@ -71,20 +72,20 @@ function git_remote_status() {
7172
# it's not a symbolic ref, but in a Git repo.
7273
function git_current_branch() {
7374
local ref
74-
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
75+
ref=$(_omb_command_git symbolic-ref --quiet HEAD 2> /dev/null)
7576
local ret=$?
7677
if [[ $ret != 0 ]]; then
7778
[[ $ret == 128 ]] && return # no git repo.
78-
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
79+
ref=$(_omb_command_git rev-parse --short HEAD 2> /dev/null) || return
7980
fi
8081
echo ${ref#refs/heads/}
8182
}
8283

8384

8485
# Gets the number of commits ahead from remote
8586
function git_commits_ahead() {
86-
if command git rev-parse --git-dir &>/dev/null; then
87-
local commits="$(command git rev-list --count @{upstream}..HEAD)"
87+
if _omb_command_git rev-parse --git-dir &>/dev/null; then
88+
local commits="$(_omb_command_git rev-list --count @{upstream}..HEAD)"
8889
if [[ "$commits" != 0 ]]; then
8990
echo "$OSH_THEME_GIT_COMMITS_AHEAD_PREFIX$commits$OSH_THEME_GIT_COMMITS_AHEAD_SUFFIX"
9091
fi
@@ -93,8 +94,8 @@ function git_commits_ahead() {
9394

9495
# Gets the number of commits behind remote
9596
function git_commits_behind() {
96-
if command git rev-parse --git-dir &>/dev/null; then
97-
local commits="$(command git rev-list --count HEAD..@{upstream})"
97+
if _omb_command_git rev-parse --git-dir &>/dev/null; then
98+
local commits="$(_omb_command_git rev-list --count HEAD..@{upstream})"
9899
if [[ "$commits" != 0 ]]; then
99100
echo "$OSH_THEME_GIT_COMMITS_BEHIND_PREFIX$commits$OSH_THEME_GIT_COMMITS_BEHIND_SUFFIX"
100101
fi
@@ -103,21 +104,21 @@ function git_commits_behind() {
103104

104105
# Outputs if current branch is ahead of remote
105106
function git_prompt_ahead() {
106-
if [[ -n "$(command git rev-list origin/$(git_current_branch)..HEAD 2> /dev/null)" ]]; then
107+
if [[ -n "$(_omb_command_git rev-list origin/$(git_current_branch)..HEAD 2> /dev/null)" ]]; then
107108
echo "$OSH_THEME_GIT_PROMPT_AHEAD"
108109
fi
109110
}
110111

111112
# Outputs if current branch is behind remote
112113
function git_prompt_behind() {
113-
if [[ -n "$(command git rev-list HEAD..origin/$(git_current_branch) 2> /dev/null)" ]]; then
114+
if [[ -n "$(_omb_command_git rev-list HEAD..origin/$(git_current_branch) 2> /dev/null)" ]]; then
114115
echo "$OSH_THEME_GIT_PROMPT_BEHIND"
115116
fi
116117
}
117118

118119
# Outputs if current branch exists on remote or not
119120
function git_prompt_remote() {
120-
if [[ -n "$(command git show-ref origin/$(git_current_branch) 2> /dev/null)" ]]; then
121+
if [[ -n "$(_omb_command_git show-ref origin/$(git_current_branch) 2> /dev/null)" ]]; then
121122
echo "$OSH_THEME_GIT_PROMPT_REMOTE_EXISTS"
122123
else
123124
echo "$OSH_THEME_GIT_PROMPT_REMOTE_MISSING"
@@ -127,19 +128,19 @@ function git_prompt_remote() {
127128
# Formats prompt string for current git commit short SHA
128129
function git_prompt_short_sha() {
129130
local SHA
130-
SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$OSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$OSH_THEME_GIT_PROMPT_SHA_AFTER"
131+
SHA=$(_omb_command_git rev-parse --short HEAD 2> /dev/null) && echo "$OSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$OSH_THEME_GIT_PROMPT_SHA_AFTER"
131132
}
132133

133134
# Formats prompt string for current git commit long SHA
134135
function git_prompt_long_sha() {
135136
local SHA
136-
SHA=$(command git rev-parse HEAD 2> /dev/null) && echo "$OSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$OSH_THEME_GIT_PROMPT_SHA_AFTER"
137+
SHA=$(_omb_command_git rev-parse HEAD 2> /dev/null) && echo "$OSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$OSH_THEME_GIT_PROMPT_SHA_AFTER"
137138
}
138139

139140
# Get the status of the working tree
140141
function git_prompt_status() {
141142
local INDEX STATUS
142-
INDEX=$(command git status --porcelain -b 2> /dev/null)
143+
INDEX=$(_omb_command_git status --porcelain -b 2> /dev/null)
143144
STATUS=""
144145
if $(echo "$INDEX" | command grep -E '^\?\? ' &> /dev/null); then
145146
STATUS="$OSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
@@ -166,7 +167,7 @@ function git_prompt_status() {
166167
elif $(echo "$INDEX" | grep '^AD ' &> /dev/null); then
167168
STATUS="$OSH_THEME_GIT_PROMPT_DELETED$STATUS"
168169
fi
169-
if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
170+
if $(_omb_command_git rev-parse --verify refs/stash >/dev/null 2>&1); then
170171
STATUS="$OSH_THEME_GIT_PROMPT_STASHED$STATUS"
171172
fi
172173
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
@@ -190,7 +191,7 @@ function git_prompt_status() {
190191
function git_compare_version() {
191192
local INPUT_GIT_VERSION INSTALLED_GIT_VERSION
192193
INPUT_GIT_VERSION=(${(s/./)1})
193-
INSTALLED_GIT_VERSION=($(command git --version 2>/dev/null))
194+
INSTALLED_GIT_VERSION=($(_omb_command_git --version 2>/dev/null))
194195
INSTALLED_GIT_VERSION=(${(s/./)INSTALLED_GIT_VERSION[3]})
195196

196197
for i in {1..3}; do
@@ -209,13 +210,13 @@ function git_compare_version() {
209210
# Outputs the name of the current user
210211
# Usage example: $(git_current_user_name)
211212
function git_current_user_name() {
212-
command git config user.name 2>/dev/null
213+
_omb_command_git config user.name 2>/dev/null
213214
}
214215

215216
# Outputs the email of the current user
216217
# Usage example: $(git_current_user_email)
217218
function git_current_user_email() {
218-
command git config user.email 2>/dev/null
219+
_omb_command_git config user.email 2>/dev/null
219220
}
220221

221222
# This is unlikely to change so make it all statically assigned

lib/omb-prompt-base.sh

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,14 @@ function _omb_prompt_format {
103103
printf -v "$1" "$__format" "$2"
104104
}
105105

106+
function _omb_command_git {
107+
command git -c core.fsmonitor= "$@"
108+
}
109+
106110
function scm {
107111
if [[ "$SCM_CHECK" = false ]]; then SCM=$SCM_NONE
108112
elif [[ -f .git/HEAD ]]; then SCM=$SCM_GIT
109-
elif _omb_util_binary_exists git && [[ -n "$(command git rev-parse --is-inside-work-tree 2> /dev/null)" ]]; then SCM=$SCM_GIT
113+
elif _omb_util_binary_exists git && [[ -n "$(_omb_command_git rev-parse --is-inside-work-tree 2> /dev/null)" ]]; then SCM=$SCM_GIT
110114
elif [[ -d .hg ]]; then SCM=$SCM_HG
111115
elif _omb_util_binary_exists hg && [[ -n "$(command hg root 2> /dev/null)" ]]; then SCM=$SCM_HG
112116
elif [[ -d .svn ]]; then SCM=$SCM_SVN
@@ -168,7 +172,7 @@ function scm_prompt_info_common {
168172
# This is added to address bash shell interpolation vulnerability described
169173
# here: https://github.com/njhartwell/pw3nage
170174
function git_clean_branch {
171-
local unsafe_ref=$(command git symbolic-ref -q HEAD 2> /dev/null)
175+
local unsafe_ref=$(_omb_command_git symbolic-ref -q HEAD 2> /dev/null)
172176
local stripped_ref=${unsafe_ref##refs/heads/}
173177
local clean_ref=${stripped_ref//[\$\`\\]/-}
174178
clean_ref=${clean_ref//[^[:print:]]/-} # strip escape sequences, etc.
@@ -181,15 +185,15 @@ function git_prompt_minimal_info {
181185
local git_status_flags=('--porcelain')
182186
SCM_STATE=${SCM_THEME_PROMPT_CLEAN}
183187

184-
if [[ "$(command git config --get bash-it.hide-status)" != "1" ]]; then
188+
if [[ "$(_omb_command_git config --get bash-it.hide-status)" != "1" ]]; then
185189
# Get the branch reference
186190
ref=$(git_clean_branch) || \
187-
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0
191+
ref=$(_omb_command_git rev-parse --short HEAD 2> /dev/null) || return 0
188192
SCM_BRANCH=${SCM_THEME_BRANCH_PREFIX}${ref}
189193

190194
# Get the status
191195
[[ "${SCM_GIT_IGNORE_UNTRACKED}" = "true" ]] && git_status_flags+='-untracked-files=no'
192-
status=$(command git status ${git_status_flags} 2> /dev/null | tail -n1)
196+
status=$(_omb_command_git status ${git_status_flags} 2> /dev/null | tail -n1)
193197

194198
if [[ -n ${status} ]]; then
195199
SCM_DIRTY=1
@@ -238,10 +242,10 @@ function git_prompt_vars {
238242
local details=''
239243
local git_status_flags=''
240244
SCM_STATE=${GIT_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}
241-
if [[ "$(command git config --get bash-it.hide-status)" != "1" ]]; then
245+
if [[ "$(_omb_command_git config --get bash-it.hide-status)" != "1" ]]; then
242246
[[ "${SCM_GIT_IGNORE_UNTRACKED}" = "true" ]] && git_status_flags='-uno'
243-
local status_lines=$((command git status --porcelain ${git_status_flags} -b 2> /dev/null ||
244-
command git status --porcelain ${git_status_flags} 2> /dev/null) | git_status_summary)
247+
local status_lines=$((_omb_command_git status --porcelain ${git_status_flags} -b 2> /dev/null ||
248+
_omb_command_git status --porcelain ${git_status_flags} 2> /dev/null) | git_status_summary)
245249
local status=$(awk 'NR==1' <<< "$status_lines")
246250
local counts=$(awk 'NR==2' <<< "$status_lines")
247251
IFS=$'\t' read untracked_count unstaged_count staged_count <<< "$counts"
@@ -258,7 +262,7 @@ function git_prompt_vars {
258262
259263
[[ "${SCM_GIT_SHOW_CURRENT_USER}" == "true" ]] && details+="$(git_user_info)"
260264
261-
SCM_CHANGE=$(command git rev-parse --short HEAD 2>/dev/null)
265+
SCM_CHANGE=$(_omb_command_git rev-parse --short HEAD 2>/dev/null)
262266
263267
local ref=$(git_clean_branch)
264268
@@ -272,7 +276,7 @@ function git_prompt_vars {
272276
local remote_name=${tracking_info%%/*}
273277
local remote_branch=${tracking_info#${remote_name}/}
274278
local remote_info=""
275-
local num_remotes=$(command git remote | wc -l 2> /dev/null)
279+
local num_remotes=$(_omb_command_git remote | wc -l 2> /dev/null)
276280
[[ "${SCM_BRANCH}" = "${remote_branch}" ]] && local same_branch_name=true
277281
if ([[ "${SCM_GIT_SHOW_REMOTE_INFO}" = "auto" ]] && [[ "${num_remotes}" -ge 2 ]]) ||
278282
[[ "${SCM_GIT_SHOW_REMOTE_INFO}" = "true" ]]; then
@@ -292,11 +296,11 @@ function git_prompt_vars {
292296
SCM_GIT_DETACHED="false"
293297
else
294298
local detached_prefix=""
295-
ref=$(command git describe --tags --exact-match 2> /dev/null)
299+
ref=$(_omb_command_git describe --tags --exact-match 2> /dev/null)
296300
if [[ -n "$ref" ]]; then
297301
detached_prefix=${SCM_THEME_TAG_PREFIX}
298302
else
299-
ref=$(command git describe --contains --all HEAD 2> /dev/null)
303+
ref=$(_omb_command_git describe --contains --all HEAD 2> /dev/null)
300304
ref=${ref#remotes/}
301305
[[ -z "$ref" ]] && ref=${SCM_CHANGE}
302306
detached_prefix=${SCM_THEME_DETACHED_PREFIX}
@@ -310,7 +314,7 @@ function git_prompt_vars {
310314
[[ "${status}" =~ ${ahead_re} ]] && SCM_BRANCH+=" ${SCM_GIT_AHEAD_CHAR}${BASH_REMATCH[1]}"
311315
[[ "${status}" =~ ${behind_re} ]] && SCM_BRANCH+=" ${SCM_GIT_BEHIND_CHAR}${BASH_REMATCH[1]}"
312316
313-
local stash_count="$(command git stash list 2> /dev/null | wc -l | tr -d ' ')"
317+
local stash_count="$(_omb_command_git stash list 2> /dev/null | wc -l | tr -d ' ')"
314318
[[ "${stash_count}" -gt 0 ]] && SCM_BRANCH+=" {${stash_count}}"
315319
316320
SCM_BRANCH+=${details}
@@ -505,9 +509,9 @@ _omb_deprecate_function 20000 python_version_prompt _omb_prompt_print_python_env
505509
506510
function git_user_info {
507511
# support two or more initials, set by 'git pair' plugin
508-
SCM_CURRENT_USER=$(command git config user.initials | sed 's% %+%')
512+
SCM_CURRENT_USER=$(_omb_command_git config user.initials | sed 's% %+%')
509513
# if `user.initials` weren't set, attempt to extract initials from `user.name`
510-
[[ -z "${SCM_CURRENT_USER}" ]] && SCM_CURRENT_USER=$(printf "%s" $(for word in $(command git config user.name | tr 'A-Z' 'a-z'); do printf "%1.1s" $word; done))
514+
[[ -z "${SCM_CURRENT_USER}" ]] && SCM_CURRENT_USER=$(printf "%s" $(for word in $(_omb_command_git config user.name | tr 'A-Z' 'a-z'); do printf "%1.1s" $word; done))
511515
[[ -n "${SCM_CURRENT_USER}" ]] && printf "%s" "$SCM_THEME_CURRENT_USER_PREFFIX$SCM_CURRENT_USER$SCM_THEME_CURRENT_USER_SUFFIX"
512516
}
513517

themes/agnoster/agnoster.theme.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,25 +327,25 @@ function prompt_histdt {
327327

328328

329329
function git_status_dirty {
330-
dirty=$(command git status -s 2> /dev/null | tail -n 1)
330+
dirty=$(_omb_command_git status -s 2> /dev/null | tail -n 1)
331331
[[ -n $dirty ]] && echo ""
332332
}
333333

334334
function git_stash_dirty {
335-
stash=$(command git stash list 2> /dev/null | tail -n 1)
335+
stash=$(_omb_command_git stash list 2> /dev/null | tail -n 1)
336336
[[ -n $stash ]] && echo ""
337337
}
338338

339339
# Git: branch/detached head, dirty status
340340
function prompt_git {
341341
local ref dirty
342-
if command git rev-parse --is-inside-work-tree &>/dev/null; then
342+
if _omb_command_git rev-parse --is-inside-work-tree &>/dev/null; then
343343
ZSH_THEME_GIT_PROMPT_DIRTY='±'
344344
dirty=$(git_status_dirty)
345345
stash=$(git_stash_dirty)
346-
ref=$(command git symbolic-ref HEAD 2> /dev/null) ||
347-
ref="$(command git describe --exact-match --tags HEAD 2> /dev/null)" ||
348-
ref="$(command git show-ref --head -s --abbrev | head -n1 2> /dev/null)"
346+
ref=$(_omb_command_git symbolic-ref HEAD 2> /dev/null) ||
347+
ref="$(_omb_command_git describe --exact-match --tags HEAD 2> /dev/null)" ||
348+
ref="$(_omb_command_git show-ref --head -s --abbrev | head -n1 2> /dev/null)"
349349
if [[ -n $dirty ]]; then
350350
prompt_segment yellow black
351351
else

themes/cooperkid/cooperkid.theme.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ GIT_SHA_PREFIX="${_omb_prompt_navy}"
1414
GIT_SHA_SUFFIX="${_omb_prompt_reset_color}"
1515

1616
function git_short_sha() {
17-
SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX"
17+
SHA=$(_omb_command_git rev-parse --short HEAD 2> /dev/null) && echo "$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX"
1818
}
1919

2020
function _omb_theme_PROMPT_COMMAND() {

0 commit comments

Comments
 (0)