diff options
Diffstat (limited to 'Completion/Unix/Command/_grep')
| -rw-r--r-- | Completion/Unix/Command/_grep | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Completion/Unix/Command/_grep b/Completion/Unix/Command/_grep index d987c2b1e..5d548b567 100644 --- a/Completion/Unix/Command/_grep +++ b/Completion/Unix/Command/_grep @@ -1,4 +1,4 @@ -#compdef grep egrep fgrep bsdgrep zgrep, zegrep, zfgrep -value-,GREP_OPTIONS,-default- +#compdef grep egrep fgrep bsdgrep zgrep zegrep zfgrep -value-,GREP_OPTIONS,-default- # Ulrik Haugen 2001 local arguments matchers command @@ -9,14 +9,16 @@ if [[ $service = *GREP_OPT* ]]; then (( CURRENT++ )) command=grep else - arguments=( - '(-e --regexp -f --file)1: :_guard "^--*" pattern' - '*:files:_files' - ) + arguments=( '(-e --regexp -f --file)1: :_guard "^--*" pattern' ) + if [[ $service = z* ]]; then + arguments+=( '*:files:_files -g "*.gz(-.)"' ) + else + arguments+=( '*:files:_files' ) + fi command="$words[1]" fi -if [[ $service != [ef]grep ]]; then +if [[ $service != (|z)[ef]grep ]]; then matchers='(--extended-regexp --fixed-strings --basic-regexp --perl-regexp -E -F -G -P)' arguments+=( |
