mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-17 18:20:07 +00:00
Disable alias of grep
If user defined alias of grep command with '-r' or '--recursive' option, it causes a slow response of command line. It is not unexpected behavior of vcs info. This commit explicitly disables alias of grep to suppress side effects.
This commit is contained in:
parent
87acc51aca
commit
f154e75667
1 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ function +vi-git-untracked() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' && \
|
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' && \
|
||||||
-n $(git status ${FLAGS} | grep -E '^\?\?' 2> /dev/null | tail -n1) ]]; then
|
-n $(git status ${FLAGS} | \grep -E '^\?\?' 2> /dev/null | tail -n1) ]]; then
|
||||||
hook_com[unstaged]+=" $(print_icon 'VCS_UNTRACKED_ICON')"
|
hook_com[unstaged]+=" $(print_icon 'VCS_UNTRACKED_ICON')"
|
||||||
VCS_WORKDIR_HALF_DIRTY=true
|
VCS_WORKDIR_HALF_DIRTY=true
|
||||||
else
|
else
|
||||||
|
@ -137,15 +137,15 @@ function +vi-vcs-detect-changes() {
|
||||||
|
|
||||||
function +vi-svn-detect-changes() {
|
function +vi-svn-detect-changes() {
|
||||||
local svn_status="$(svn status)"
|
local svn_status="$(svn status)"
|
||||||
if [[ -n "$(echo "$svn_status" | grep \^\?)" ]]; then
|
if [[ -n "$(echo "$svn_status" | \grep \^\?)" ]]; then
|
||||||
hook_com[unstaged]+=" $(print_icon 'VCS_UNTRACKED_ICON')"
|
hook_com[unstaged]+=" $(print_icon 'VCS_UNTRACKED_ICON')"
|
||||||
VCS_WORKDIR_HALF_DIRTY=true
|
VCS_WORKDIR_HALF_DIRTY=true
|
||||||
fi
|
fi
|
||||||
if [[ -n "$(echo "$svn_status" | grep \^\M)" ]]; then
|
if [[ -n "$(echo "$svn_status" | \grep \^\M)" ]]; then
|
||||||
hook_com[unstaged]+=" $(print_icon 'VCS_UNSTAGED_ICON')"
|
hook_com[unstaged]+=" $(print_icon 'VCS_UNSTAGED_ICON')"
|
||||||
VCS_WORKDIR_DIRTY=true
|
VCS_WORKDIR_DIRTY=true
|
||||||
fi
|
fi
|
||||||
if [[ -n "$(echo "$svn_status" | grep \^\A)" ]]; then
|
if [[ -n "$(echo "$svn_status" | \grep \^\A)" ]]; then
|
||||||
hook_com[staged]+=" $(print_icon 'VCS_STAGED_ICON')"
|
hook_com[staged]+=" $(print_icon 'VCS_STAGED_ICON')"
|
||||||
VCS_WORKDIR_DIRTY=true
|
VCS_WORKDIR_DIRTY=true
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue