Skip to content

Commit

Permalink
add ZSH completion function _grc
Browse files Browse the repository at this point in the history
Based on zsh's provided _sudo function
  • Loading branch information
xPMo committed Mar 9, 2018
1 parent ffd3b12 commit f4ecb72
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions _grc
@@ -0,0 +1,25 @@
#compdef grc

setopt localoptions extended_glob

local environ e cmd
local -a args
local -a _comp_priv_prefix

zstyle -a ":completion:${curcontext}:" environ environ

for e in "${environ[@]}"
do local -x "$e"
done

args=(
'(-e --stderr)'{-e,--stderr}'[redirect stderr; do not automatically redirect stdout]'
'(-s --stdout)'{-s,--stdout}'[redirect stdout; even with -e/--stderr]'
'(-c <name>--config=<name>)'{-c+,--config=-}'[use <name> as configuration file for grcat]:file:_files'
'--color=-[colo?urize output]:color:(on off auto)'
'(-h --help)'{-h,--help}'[display help message and exit]'
'--pty[run command in pseudotermnial (experimental)]'
'*::arguments:{ _normal }'
)

_arguments -s $args

0 comments on commit f4ecb72

Please sign in to comment.