Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Based on zsh's provided _sudo function
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |