about summary refs log tree commit diff
path: root/Completion/Unix/Command/_paste
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2017-03-14 16:13:05 +0100
committerOliver Kiddle <opk@zsh.org>2017-03-14 16:13:05 +0100
commit45d910356ad6b75d47e56ed5cef2f43bffc12fca (patch)
treed9ad7ef4e55a28c4bb0024cb0100f567944b52f4 /Completion/Unix/Command/_paste
parente869952200852a414debc6475a652e04e3b03641 (diff)
downloadzsh-45d910356ad6b75d47e56ed5cef2f43bffc12fca.tar.gz
zsh-45d910356ad6b75d47e56ed5cef2f43bffc12fca.tar.xz
zsh-45d910356ad6b75d47e56ed5cef2f43bffc12fca.zip
40842: update completions for coreutils and similar utilities, also improving BSD and Solaris support
Diffstat (limited to 'Completion/Unix/Command/_paste')
-rw-r--r--Completion/Unix/Command/_paste19
1 files changed, 19 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_paste b/Completion/Unix/Command/_paste
new file mode 100644
index 000000000..6efe8eacb
--- /dev/null
+++ b/Completion/Unix/Command/_paste
@@ -0,0 +1,19 @@
+#compdef paste
+
+local -a args
+local dopt='[specify delimiter list]:delimiter list [tab]'
+local sopt='[paste one file at a time instead of in parallel]'
+
+if _pick_variant gnu=GNU unix --version; then
+  args=(
+    '(-z --zero-terminated)'{-z,--zero-terminated}'[use NUL as line delimiter instead of newline]'
+    "(-d)--delimiters=$dopt"
+    "(-s)--serial$sopt"
+    '(- *)--help[display help information]'
+    '(- *)--version[display version information]'
+  )
+else
+  args=( -A "-?*" )
+fi
+
+_arguments -s $args "(--delimiters)-d+$dopt" "(--serial)-s$sopt" '*:file:_files'