00ec11d3c0a2b2b7413ad84940ddec299aafbb04

Author
DanielFGray <DanielFGray@gmail.com>
Committer
DanielFGray <DanielFGray@gmail.com>
Date

Message

ignore any grep aliases that might be defined

Diff

  1diff --git a/lib/git.zsh b/lib/git.zsh
  2index aba0954222f66c8fafae0f3f3149a36e3a6297e2..913a642b3f95a573404d7d89d0ebd360da3a1743 100644
  3--- a/lib/git.zsh
  4+++ b/lib/git.zsh
  5@@ -78,7 +78,7 @@ function git_prompt_long_sha() {
  6 git_prompt_status() {
  7   INDEX=$(command git status --porcelain -b 2> /dev/null)
  8   STATUS=""
  9-  if $(echo "$INDEX" | grep -E '^\?\? ' &> /dev/null); then
 10+  if $(echo "$INDEX" | command grep -E '^\?\? ' &> /dev/null); then
 11     STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
 12   fi
 13   if $(echo "$INDEX" | grep '^A  ' &> /dev/null); then
 14diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh
 15index ff95d5e40093d796783c2a72e0a8226dcc2d6ec2..ed4d23713dca292151e0dfd8c0e228ad0e000038 100644
 16--- a/plugins/mercurial/mercurial.plugin.zsh
 17+++ b/plugins/mercurial/mercurial.plugin.zsh
 18@@ -42,7 +42,7 @@ $ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_HG_PROMPT_SU
 19 
 20 function hg_dirty_choose {
 21   if [ $(in_hg) ]; then
 22-    hg status 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]'
 23+    hg status 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'
 24     if [ $pipestatus[-1] -eq 0 ]; then
 25       # Grep exits with 0 when "One or more lines were selected", return "dirty".
 26       echo $1
 27diff --git a/plugins/svn-fast-info/svn-fast-info.plugin.zsh b/plugins/svn-fast-info/svn-fast-info.plugin.zsh
 28index ea19bcea07f2d71e04a2ad49e5e4811ab4953ea3..9ea7f641dc1e0a243ef6f587e6dd71bb2d5bd860 100644
 29--- a/plugins/svn-fast-info/svn-fast-info.plugin.zsh
 30+++ b/plugins/svn-fast-info/svn-fast-info.plugin.zsh
 31@@ -63,11 +63,11 @@ function svn_current_revision() {
 32 function svn_status_info() {
 33   local svn_status_string="$ZSH_THEME_SVN_PROMPT_CLEAN"
 34   local svn_status="$(svn status 2> /dev/null)";
 35-  if grep -E '^\s*A' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_ADDITIONS:-+}"; fi
 36-  if grep -E '^\s*D' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DELETIONS:-✖}"; fi
 37-  if grep -E '^\s*M' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_MODIFICATIONS:-✎}"; fi
 38-  if grep -E '^\s*[R~]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_REPLACEMENTS:-∿}"; fi
 39-  if grep -E '^\s*\?' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_UNTRACKED:-?}"; fi
 40-  if grep -E '^\s*[CI!L]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DIRTY:-'!'}"; fi
 41+  if command grep -E '^\s*A' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_ADDITIONS:-+}"; fi
 42+  if command grep -E '^\s*D' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DELETIONS:-✖}"; fi
 43+  if command grep -E '^\s*M' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_MODIFICATIONS:-✎}"; fi
 44+  if command grep -E '^\s*[R~]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_REPLACEMENTS:-∿}"; fi
 45+  if command grep -E '^\s*\?' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_UNTRACKED:-?}"; fi
 46+  if command grep -E '^\s*[CI!L]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DIRTY:-'!'}"; fi
 47   echo $svn_status_string
 48 }
 49diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh
 50index ba281d7909499529a6fcbd4e988078b2f32a22d5..9f7a4c6eb4721c57b5f6c1b710a052b494248dc9 100644
 51--- a/plugins/svn/svn.plugin.zsh
 52+++ b/plugins/svn/svn.plugin.zsh
 53@@ -61,7 +61,7 @@ function svn_get_rev_nr() {
 54 function svn_dirty_choose() {
 55   if in_svn; then
 56     root=`svn info 2> /dev/null | sed -n 's/^Working Copy Root Path: //p'`
 57-    if $(svn status $root 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]'); then
 58+    if $(svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'); then
 59       # Grep exits with 0 when "One or more lines were selected", return "dirty".
 60       echo $1
 61     else
 62@@ -78,7 +78,7 @@ function svn_dirty() {
 63 function svn_dirty_choose_pwd () {
 64   if in_svn; then
 65     root=$PWD
 66-    if $(svn status $root 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]'); then
 67+    if $(svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'); then
 68       # Grep exits with 0 when "One or more lines were selected", return "dirty".
 69       echo $1
 70     else
 71diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
 72index 7a62bd860802d3f093d28eb2387bd26f4e427ea1..8c7be6e0123e95f7c737966e3f975d8a67102808 100644
 73--- a/themes/agnoster.zsh-theme
 74+++ b/themes/agnoster.zsh-theme
 75@@ -123,10 +123,10 @@ prompt_hg() {
 76       st=""
 77       rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
 78       branch=$(hg id -b 2>/dev/null)
 79-      if `hg st | grep -Eq "^\?"`; then
 80+      if `hg st | grep -q "^\?"`; then
 81         prompt_segment red black
 82         st='±'
 83-      elif `hg st | grep -Eq "^(M|A)"`; then
 84+      elif `hg st | grep -q "^(M|A)"`; then
 85         prompt_segment yellow black
 86         st='±'
 87       else
 88diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme
 89index 443d1d5ee736621b92a2123126c2e01a2f759f95..148abec10e9cb207fac5dc35e2398e9979d688a6 100644
 90--- a/themes/bureau.zsh-theme
 91+++ b/themes/bureau.zsh-theme
 92@@ -31,7 +31,7 @@ bureau_git_status () {
 93   if $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then
 94     _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
 95   fi
 96-  if $(echo "$_INDEX" | grep -E '^\?\? ' &> /dev/null); then
 97+  if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then
 98     _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
 99   fi
100   if $(echo "$_INDEX" | grep '^UU ' &> /dev/null); then
101diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme
102index 5dbf2e4f69417aa99423cad14509dce9579ee6dd..ccce4197ac29e5c1ac85d5dc8b4280fa567e973b 100644
103--- a/themes/mortalscumbag.zsh-theme
104+++ b/themes/mortalscumbag.zsh-theme
105@@ -10,12 +10,12 @@ function my_git_prompt() {
106   fi
107 
108   # is anything staged?
109-  if $(echo "$INDEX" | grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then
110+  if $(echo "$INDEX" | command grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then
111     STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
112   fi
113 
114   # is anything unstaged?
115-  if $(echo "$INDEX" | grep -E -e '^[ MARC][MD] ' &> /dev/null); then
116+  if $(echo "$INDEX" | command grep -E -e '^[ MARC][MD] ' &> /dev/null); then
117     STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
118   fi
119 
120@@ -25,7 +25,7 @@ function my_git_prompt() {
121   fi
122 
123   # is anything unmerged?
124-  if $(echo "$INDEX" | grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then
125+  if $(echo "$INDEX" | command grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then
126     STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
127   fi
128