Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Force globbing inside of parameter substitution
- X-seq: zsh-workers 6422
- From: "Andrej Borsenkow" <borsenkow.msk@xxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Force globbing inside of parameter substitution
- Date: Tue, 1 Jun 1999 16:11:08 +0400
- Importance: Normal
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Suppose, I need a list of files sperated by comma. The straightforward way
would be something like
${(j/,/)${:-*}}
Unfortunately, it does not work - it simply results in single `*'.
Using ${(j/,/)$(print *)} does _almost_ wat I'd like ... with two caveats:
1. the file names with spaces are mangled
2. it is potentially less efficient.
Is the use of temporary array the only possibility? (I am mostly interested
in interactive usage, where it should go into one command line).
As a side note: it looks, like GLOB_SUBST does not apply in the above case.
I have globsubst off, but the result of ${:-*} is still globbed. Is it
intentional? I would deem it as a bug.
/andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author