1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-22 16:20:23 +02:00

Jun T.: 30658: complete more uniq options

This commit is contained in:
Peter Stephenson 2012-09-05 14:54:39 +00:00
parent a090655b16
commit 1f5ef83f0f
2 changed files with 9 additions and 2 deletions

View file

@ -13,12 +13,17 @@ args=(
'(-u --unique)'{-u,--unique}'[only print unique lines]'
'(-w --check-chars)'{-w,--check-chars=}'[specify maximum number of characters to compare]:characters'
'(-W --check-fields)'{-W,--check-fields=}'[specify maximum number of fields to compare]:fields'
'(-z --zero-terminated)'{-z,--zero-terminated}'[delimit lines with null character, not newline]'
'(- *)--help[display help information]'
'(- *)--version[display version information]'
)
if ! _pick_variant gnu=Free\ Soft unix --version; then
args=( ${(M)args:#(|\*)(|\(*\))-[cdufs]*} )
local optchars="cdufs"
if [[ "$OSTYPE" == (darwin|freebsd)* ]]; then
optchars="${optchars}i"
fi
args=( ${(M)args:#(|\*)(|\(*\))-[$optchars]*} )
fi
_arguments "$args[@]" \