summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Unix/Command/_uniq7
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 853977983..ff8c8f666 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2012-09-05 Peter Stephenson <pws@csr.com>
+ * Jun T.: 30658: Completion/Unix/Command/_uniq: more options.
+
* Silas Silva: users/17223: Completion/Unix/Command/_lp:
page-ranges option.
@@ -135,5 +137,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5714 $
+* $Revision: 1.5715 $
*****************************************************
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[@]" \