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

Re: Chatty little precompiler for _arguments



Bart Schaefer wrote:

> On Sep 20, 10:43am, Sven Wischnowsky wrote:
> } Subject: Re: Chatty little precompiler for _arguments
> }
> } Bart Schaefer wrote:
> } 
> } > though it would be really useful if $param:q could emit quoting instead of
> } > backslashes.
> } 
> } I would be against this because its much less useful in cases where
> } you stuff together string from multiple parameters.
> 
> I'm not sure what you're getting at, there.

I was thinking about uses as in `_path_files' where we have
`$linepath${testpath:q}' (yes, this could be changed to `(q)' some
time). The only thing I wanted to point out that having *only* the
put-in-quotes style would be ugly in such cases (and I knew about the
`${:-...}' trick, of course, but in contexts like `_pth_files' I would 
like to avoid the quotes altogether).

And I didn't want to say that I would be against changing the
behaviour of `:q' as long as we still have the possibility to get
backslashes with the `(q)' flag.

> On Sep 20,  2:15pm, Sven Wischnowsky wrote:
> } Subject: PATCH: was: Re: Chatty little precompiler for _arguments
> }
> } This does that. `${(qqq)foo}' looks a bit silly doesn't it?
> 
> The man who wrote
> 
> ${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(${~words[1]} --help 2>&1)//\[--/
> --}:#[ 	]#-*}//,/
> }}:#[ 	]#--*}#*--}%%[, ]*}:#}
> 
> wants to talk about "looks a bit silly"?

;-)


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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