Skip to content

Commit 4f7058b

Browse files
committed
Fix for git aliased to hub
1 parent 81a1b5c commit 4f7058b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

k.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ k () {
274274
fi
275275
if [[ $(command git rev-parse --is-inside-work-tree 2>/dev/null) == true ]]; then
276276
IS_GIT_REPO=1
277-
GIT_TOPLEVEL=$(git rev-parse --show-toplevel)
277+
GIT_TOPLEVEL=$(command git rev-parse --show-toplevel)
278278
else
279279
IS_GIT_REPO=0
280280
fi
@@ -401,10 +401,10 @@ k () {
401401
# If the directory is ignored, skip it
402402
if command git check-ignore --quiet ${NAME} 2>/dev/null
403403
then STATUS='!!'
404-
else STATUS=$(git --git-dir=$GIT_TOPLEVEL/.git --work-tree=$GIT_TOPLEVEL status --porcelain --untracked-files=normal ${${${NAME:a}##$GIT_TOPLEVEL}#*/})
404+
else STATUS=$(command git --git-dir=$GIT_TOPLEVEL/.git --work-tree=$GIT_TOPLEVEL status --porcelain --untracked-files=normal ${${${NAME:a}##$GIT_TOPLEVEL}#*/})
405405
fi
406406
else
407-
STATUS=$(git status --porcelain --ignored --untracked-files=normal $NAME)
407+
STATUS=$(command git status --porcelain --ignored --untracked-files=normal $NAME)
408408
fi
409409
STATUS=${STATUS[1,2]}
410410
if [[ $STATUS == ' M' ]]; then REPOMARKER=$'\e[0;31m+\e[0m'; # Tracked & Dirty

0 commit comments

Comments
 (0)