Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: remove duplicate array values in parameter expansion
- X-seq: zsh-workers 16357
- From: Clint Adams <clint@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: remove duplicate array values in parameter expansion
- Date: Mon, 17 Dec 2001 09:03:58 -0500
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <1011217042407.ZM2323@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20011214215105.GA24236@xxxxxxxx> <011214141539.ZM32471@xxxxxxxxxxxxxxxxxxxxxxx> <20011216205032.GA32057@xxxxxxxx> <1011217042407.ZM2323@xxxxxxxxxxxxxxxxxxxxxxx>
> Hrm. I think I'd have preferred to save (n) for numeric sorting. What
> was wrong with lower-case (u)? It's not used yet. If that's a problem,
> just use the digit (1)?
Nothing; In my quick search for a letter, I mistakenly took :u for (u).
Index: Doc/Zsh/expn.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/expn.yo,v
retrieving revision 1.39
diff -u -r1.39 expn.yo
--- Doc/Zsh/expn.yo 2001/12/16 21:06:12 1.39
+++ Doc/Zsh/expn.yo 2001/12/17 14:02:35
@@ -727,6 +727,9 @@
)
enditem()
)
+item(tt(u))(
+Expand only the first occurrence of each unique word.
+)
item(tt(U))(
Convert all letters in the result to upper case.
)
@@ -760,9 +763,6 @@
access single words in the result, one has to use nested expansions as
in `tt(${${(z)foo}[2]})'. Likewise, to remove the quotes in the
resulting words one would do: `tt(${(Q)${(z)foo}})'.
-)
-item(tt(n))(
-Expand only the first occurrence of each unique word.
)
enditem()
Index: Src/subst.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/subst.c,v
retrieving revision 1.27
diff -u -r1.27 subst.c
--- Src/subst.c 2001/12/17 01:16:37 1.27
+++ Src/subst.c 2001/12/17 14:02:36
@@ -997,7 +997,7 @@
shsplit = 1;
break;
- case 'n':
+ case 'u':
unique = 1;
break;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author