summaryrefslogtreecommitdiff
path: root/functions/vcs.zsh
diff options
context:
space:
mode:
authorKentaro Hayashi <hayashi@clear-code.com>2017-11-27 09:15:44 +0300
committerKentaro Hayashi <hayashi@clear-code.com>2017-11-27 09:15:44 +0300
commitf154e75667aff0801c3d978b44f5e4551d91e240 (patch)
tree12e4116f895cbdd0f015413ed9e8873fd5cc178f /functions/vcs.zsh
parent87acc51acab3ed4fd33cda2386abed6f98c80720 (diff)
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.
Diffstat (limited to 'functions/vcs.zsh')
-rw-r--r--functions/vcs.zsh8
1 files changed, 4 insertions, 4 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh
index c3e507b9..89f04143 100644
--- a/functions/vcs.zsh
+++ b/functions/vcs.zsh
@@ -17,7 +17,7 @@ function +vi-git-untracked() {
fi
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')"
VCS_WORKDIR_HALF_DIRTY=true
else
@@ -137,15 +137,15 @@ function +vi-vcs-detect-changes() {
function +vi-svn-detect-changes() {
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')"
VCS_WORKDIR_HALF_DIRTY=true
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')"
VCS_WORKDIR_DIRTY=true
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')"
VCS_WORKDIR_DIRTY=true
fi