summary refs log tree commit diff
path: root/Completion/Unix/Command/_paste
blob: d9598bfefc50f34be51f90a0610c89168fcbba4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#compdef paste gpaste

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'