diff options
author | Oliver Kiddle <opk@zsh.org> | 2015-05-03 16:53:47 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2015-05-03 16:53:57 +0200 |
commit | ab7ec8d9851fea8230e1ccfba284c5bfaf457d88 (patch) | |
tree | 837b14c838b96728ebdb530eb20d35737ef8419b /Completion/Unix/Command/_join | |
parent | b29278c69a67089ba225a98478069eb3f32ab4e6 (diff) | |
download | zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.tar.gz zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.tar.xz zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.zip |
35011: update completions for some common Unix commands,
in particular improving FreeBSD support
Diffstat (limited to 'Completion/Unix/Command/_join')
-rw-r--r-- | Completion/Unix/Command/_join | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/Completion/Unix/Command/_join b/Completion/Unix/Command/_join index 956d9d3b8..4915a0600 100644 --- a/Completion/Unix/Command/_join +++ b/Completion/Unix/Command/_join @@ -1,23 +1,29 @@ -#compdef join +#compdef join gjoin -# completions for GNU join version 5.97 - -local arguments - -arguments=( - '-a+[print unpairable lines coming from file FILENUM, where FILENUM is 1 or 2, corresponding to FILE1 or FILE2]:file number:(1 2)' - '-e+[replace missing input fields with EMPTY]:replacement string:' - '(-i --ignore-case)'{-i,--ignore-case}'[ignore differences in case when comparing fields]' - "-j+[equivalent to '-1 FIELD -2 FIELD']:field number:" - '-o+[obey FORMAT while constructing output line]:format string:' - '-t+[use CHAR as input and output field separator]:separator:' - '-v+[like -a FILENUM, but suppress joined output lines]:file number:(1 2)' - '-1+[join on this FIELD of file 1]:field number:' - '-2+[join on this FIELD of file 2]:field number:' - --help'[display help and exit]' - --version'[output version information and exit]' - '1:file 1:_files' - '2:file 2:_files' +local args variant +args=( + '*-a+[print unpairable lines from specified file]:file number:(1 2)' + '-e+[replace missing input fields with specified string]:replacement string' + "(-1 -2)-j+[join on specified field for both files]:field number" + '-o+[use specified output format]:format string' + '-t+[use specified character as field separator]:separator' + '*-v+[like -a, but suppress joined output lines]:file number:(1 2)' + '(-j -1 -j1)'{-j1,-1+}'[join on specified field of first file]:field number' + '(-j -2 -j2)'{-j2,-2+}'[join on specified field of second file]:field number' + '1:file:_files' '2:file:_files' +) +_pick_variant -r variant gnu=GNU $OSTYPE --version +case $variant in + gnu) + args+=( + '(-i --ignore-case)'{-i,--ignore-case}'[ignore differences in case when comparing fields]' + '(-)--help[display help information]' + '(-)--version[output version information]' + '(--check-order --nocheck-order)'{--check-order,--nocheck-order} + '--header[treat first line in each file as field headers]' + '(-z --zero-terminated)'{-z,--zero-terminated}'[end lines with 0 byte, not newline]' ) + ;; +esac -_arguments -s $arguments +_arguments -s $args |