From 64ef1eddfd4fa79a0720945e189cf7c3a44bde9c Mon Sep 17 00:00:00 2001 From: dana Date: Mon, 4 Jun 2018 10:04:27 -0500 Subject: 42931: completion for several utilities especially for checksums across a variety of systems --- Completion/Unix/Command/_tee | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Completion/Unix/Command/_tee (limited to 'Completion/Unix/Command/_tee') diff --git a/Completion/Unix/Command/_tee b/Completion/Unix/Command/_tee new file mode 100644 index 000000000..66ef66e19 --- /dev/null +++ b/Completion/Unix/Command/_tee @@ -0,0 +1,32 @@ +#compdef tee gtee + +local ret=1 +local -a context line state state_descr args +local -A opt_args + +args=( + '(: -)--help[display help information]' + '(: -)--version[display version information]' + '(-a --append)'{-a,--append}'[append to files instead of overwriting]' + '(-i --ignore-interrupts)'{-i,--ignore-interrupts}'[ignore interrupt signals]' + '(--output-error)-p[warn on errors writing to non-pipes]' + '(-p)--output-error=[specify write-error behavior]: :->errmodes' +) + +# Filter out non-GNU options if applicable +_pick_variant gnu='Free Soft' unix --version || +args=( ${(@M)args:#(|*\))-[ai]\[*} ) + +_arguments -s -S : $args '*: :_files' && ret=0 + +[[ $state == errmodes ]] && { + args=( + 'exit[exit on errors writing to any output]' + 'exit-nopipe[exit on errors writing to non-pipes]' + 'warn[warn on errors writing to any output]' + 'warn-nopipe[warn on errors writing to non-pipes]' + ) + _values 'error mode' $args && ret=0 +} + +return ret -- cgit 1.4.1