* PATCH: minor fix for _uniq
@ 2012-09-05 13:35 Jun T.
0 siblings, 0 replies; only message in thread
From: Jun T. @ 2012-09-05 13:35 UTC (permalink / raw)
To: zsh-workers
Minor changes to the completion for 'uniq'.
Added an option -i for MacOSX (darwin) and freebsd,
and options -z/--zero-terminated for Gnu version.
I could not find options -t/--separator and -W/--check-fields in
my Linux boxes, but I didn't remove them.
Index: Completion/Unix/Command/_uniq
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_uniq,v
retrieving revision 1.1
diff -u -r1.1 _uniq
--- Completion/Unix/Command/_uniq 23 Feb 2004 17:03:31 -0000 1.1
+++ Completion/Unix/Command/_uniq 5 Sep 2012 13:28:26 -0000
@@ -13,12 +13,17 @@
'(-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[@]" \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-09-05 14:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 13:35 PATCH: minor fix for _uniq Jun T.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).