diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2013-11-07 14:52:31 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2013-11-07 14:52:31 +0100 |
commit | d799ac78a744a5359563af55b4dee9e91255a1dc (patch) | |
tree | 73475ed7089e6ee050085a96b88018994b43bdfc /Completion/Unix/Command/_cat | |
parent | abfb3b136a4ad5b2832fb7d920442a2bb28c0697 (diff) | |
parent | 375115c7dfd6dff576915d25fe2ecdd381dd9d81 (diff) | |
download | zsh-d799ac78a744a5359563af55b4dee9e91255a1dc.tar.gz zsh-d799ac78a744a5359563af55b4dee9e91255a1dc.zip |
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Unix/Command/_cat')
-rw-r--r-- | Completion/Unix/Command/_cat | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_cat b/Completion/Unix/Command/_cat new file mode 100644 index 000000000..e223d90d9 --- /dev/null +++ b/Completion/Unix/Command/_cat @@ -0,0 +1,43 @@ +#compdef cat + +local -a args + +if _pick_variant gnu=GNU unix --version; then + args=( + '(-A --show-all)'{-A,--show-all}'[equivalent to -vET]' + '(-b --number-nonblank -n --number)'{-b,--number-nonblank}'[number nonempty output lines, overrides -n]' + '-e[equivalent to -vE]' + '(-E --show-ends)'{-E,--show-ends}'[display $ at end of each line]' + '(-n --number)'{-n,--number}'[number all output lines]' + '(-s --squeeze-blank)'{-s,--squeeze-blank}'[suppress repeated empty output lines]' + '-t[equivalent to -vT]' + '(-T --show-tabs)'{-T,--show-tabs}'[display TAB characters as ^I]' + '-u[ignored]' + '(-v --show-nonprinting)'{-v,--show-nonprinting}'[use ^ and M- notation, except for LFD and TAB]' + '(- : *)--help[display help and exit]' + '(- : *)--version[output version information and exit]' + '*:files:_files' + ) + +elif [[ "$OSTYPE" == (freebsd|dragonfly|darwin)* ]]; then + args=( + '(-n)-b[number non-blank output lines]' + '(-v)-e[display $ at the end of each line (implies -v)]' + '-n[number all output lines]' + '-s[squeeze multiple blank lines into one]' + '(-v)-t[display tab as ^I (implies -v)]' + '-u[do not buffer output]' + '-v[display non-printing chars as ^X or M-a]' + '(-)*:files:_files' + ) + +else + # POSIX reqires '-u', and most OSes may support '-n' + args=( + '-n[number all output lines]' + '-u[do not buffer output]' + '*:files:_files' + ) +fi + +_arguments -s -S : $args |