summary refs log tree commit diff
path: root/Completion/Unix/Command/_paste
diff options
context:
space:
mode:
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'