diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2000-04-20 00:48:27 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2000-04-20 00:48:27 +0000 |
commit | a903dcba4f0c0ae7b0b80d60604c8a30825aa4e1 (patch) | |
tree | 58fa0c22e0ee085a254e15fd41c8b2b3c360ab32 /Completion/Builtins | |
parent | cd962793dfcc547b5c0933c4c8bcce1b1e859a7b (diff) | |
download | zsh-a903dcba4f0c0ae7b0b80d60604c8a30825aa4e1.tar.gz zsh-a903dcba4f0c0ae7b0b80d60604c8a30825aa4e1.tar.xz zsh-a903dcba4f0c0ae7b0b80d60604c8a30825aa4e1.zip |
Add completion for file descriptors
Diffstat (limited to 'Completion/Builtins')
-rw-r--r-- | Completion/Builtins/_print | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Completion/Builtins/_print b/Completion/Builtins/_print index f2634e124..11b089a14 100644 --- a/Completion/Builtins/_print +++ b/Completion/Builtins/_print @@ -1,10 +1,14 @@ #compdef print -local state expl line eflag +local state expl line eflag pflag # -e flag available only after -R eflag="${words[1,CURRENT-1][(r)-*R*]:+-e[enable escapes]}" +# -p flag only relevant if we have a coprocess +(:>&p) 2>/dev/null && + pflag='(-s -u -z)-p[print arguments to input of coprocess]' + _arguments -C -s \ '-r[ignore escape conventions of echo]' \ '(-r -b -m -s -l -N -o -O -i -c -u -p -z -D -P)-R[emulate BSD echo (no escapes, -n & -e flags only)]' \ @@ -18,9 +22,8 @@ _arguments -C -s \ '(-o)-O[sort arguments in descending order]' \ '-i[case-insensitive sorting]' \ '(-n -l -N)-c[print arguments in columns]' \ - '(-s -p -z)-u+[specify file-descriptor to print arguments to]:file-descritor' \ - '(-s -u -z)-p[print arguments to input of coprocess]' \ + '(-s -p -z)-u+[specify file-descriptor to print arguments to]:file-descriptor:_file_descriptors' \ '(-s -p -u)-z[push arguments onto editing buffer stack]' \ '-D[substitute any arguments which are named directories using ~ notation]' \ '-P[perform prompt expansion]' \ - $eflag '*:default:_default' + $pflag $eflag '*:default:_default' |