about summary refs log tree commit diff
path: root/Completion/Unix/Command/_tee
diff options
context:
space:
mode:
authordana <dana@dana.is>2018-06-04 10:04:27 -0500
committerOliver Kiddle <okiddle@yahoo.co.uk>2018-06-07 18:19:55 +0200
commit64ef1eddfd4fa79a0720945e189cf7c3a44bde9c (patch)
tree9237ef4615c0643b783d5fac4f007f9cb4fc693d /Completion/Unix/Command/_tee
parent594f2ff06e85bf27b154dd703ee3b2dd7f168bc0 (diff)
downloadzsh-64ef1eddfd4fa79a0720945e189cf7c3a44bde9c.tar.gz
zsh-64ef1eddfd4fa79a0720945e189cf7c3a44bde9c.tar.xz
zsh-64ef1eddfd4fa79a0720945e189cf7c3a44bde9c.zip
42931: completion for several utilities especially for checksums across a variety of systems
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