diff --git a/configs/alias_useful.fish b/configs/alias_useful.fish index 6205c1d..fc14df0 100755 --- a/configs/alias_useful.fish +++ b/configs/alias_useful.fish @@ -287,7 +287,7 @@ end ################ GREP ######################################################### -if test -e /usr/bin/ugrep +if command -q ugrep alias grep='ugrep --color=auto' alias egrep='ugrep -E --color=auto' alias fgrep='ugrep -F --color=auto' @@ -296,6 +296,12 @@ else alias fgrep='grep -F' end +if command -q ugrep + alias igrep='ugrep --color=auto --invert-match' +else if command -q grep + alias igrep='grep --color=auto --invert-match' +end + ################ WGET ######################################################### if test -e /usr/bin/wget