zsh-workers
 help / color / mirror / code / Atom feed
* Force globbing inside of parameter substitution
@ 1999-06-01 12:11 Andrej Borsenkow
  1999-06-01 15:36 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 1999-06-01 12:11 UTC (permalink / raw)
  To: ZSH workers mailing list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-06-01 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-01 12:11 Force globbing inside of parameter substitution Andrej Borsenkow
1999-06-01 15:36 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).