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

Re: foo(:...) and foo~ glob



Zoltan Hidvegi wrote:
>the (:quals) syntax no longer works.  The idea was that foo(:...) should
>not do globbing if there are no wildcard, but it should execute the
>modifiers.

It was always documented as working on names of existing files.
It's useful functionality, of course, but...

>            This is very useful for general text manipulation.  Of course
>${${:-foo}:...} still works, but it's quite ugly.

But this is more meaningful, and how often are you actually applying
qualifiers to a literal string rather than a $ expansion?

I'm trying to keep this as simple and orthogonal as possible.  (:quals)
is part of the glob syntax, and ${:quals} is part of the parameter
expansion syntax.  The latter is the proper syntax for manipulation
arbitrary strings.

>ls *~
>rm foo~
>dd if=~/foo of=bar
>
>etc.  None of these work anymore.

Good point.  I'll change this back.

-zefram



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