Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: parameter and quoting (was: Re: Completion problems.)



Bart Schaefer wrote:

> Hrm.  One problem which may not even be worth mentioning is that
> 
> 	${(Qq)param}	acts like ${(q)param} and
> 	${(qQ)param}	acts like ${(Q)param}
> 
> whereas other "inversions" like using (j///s///) always both happen and
> always happen in the same order regardless of the order in which the flags
> appear.

This makes the result look as if both flags were used, `q' first,
which means that `${(qQ)foo}' is the same as ${foo}.

Bye
 Sven

--- os/subst.c	Thu Aug  5 16:27:16 1999
+++ Src/subst.c	Fri Aug  6 09:11:21 1999
@@ -825,10 +825,10 @@
 		    break;
 
 		case 'q':
-		    quotemod = 1;
+		    quotemod++;
 		    break;
 		case 'Q':
-		    quotemod = -1;
+		    quotemod--;
 		    break;
 		case 'X':
 		    quoteerr = 1;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author