summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-09-05 14:54:39 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-09-05 14:54:39 +0000
commit1f5ef83f0f3aea0597ef3db7a05970420646bfdc (patch)
tree3f2d8bf457dbc219aa8d9e99490fd07302464f06 /Completion/Unix/Command
parenta090655b16596b232f2e2781b7d80e4ead53589c (diff)
downloadzsh-1f5ef83f0f3aea0597ef3db7a05970420646bfdc.tar.gz
zsh-1f5ef83f0f3aea0597ef3db7a05970420646bfdc.tar.xz
zsh-1f5ef83f0f3aea0597ef3db7a05970420646bfdc.zip
Jun T.: 30658: complete more uniq options
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_uniq7
1 files changed, 6 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_uniq b/Completion/Unix/Command/_uniq
index be58fd775..dcd7a6f49 100644
--- a/Completion/Unix/Command/_uniq
+++ b/Completion/Unix/Command/_uniq
@@ -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[@]" \