summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_tee
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2018-08-27 13:31:04 +0200
committerAxel Beckert <abe@deuxchevaux.org>2018-08-27 13:31:04 +0200
commit719a715614f2182a76b30ad27a327d70a86f34f1 (patch)
treea437eb29da8035bf7c2e30506c08fe6f15719871 /Completion/Unix/Command/_tee
parent7da8d19c224860ae4d6aa3f077fca7f734f20d88 (diff)
parentef61918398517473b9b594690a3be375f607cebe (diff)
downloadzsh-719a715614f2182a76b30ad27a327d70a86f34f1.tar.gz
zsh-719a715614f2182a76b30ad27a327d70a86f34f1.zip
Merge tag 'zsh-5.5.1-test-2' into debian
Test release: 5.5.1-test-2.
Diffstat (limited to 'Completion/Unix/Command/_tee')
-rw-r--r--Completion/Unix/Command/_tee32
1 files changed, 32 insertions, 0 deletions
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