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

no way to keep my glob expanded ? (i don't think so)



hello zsh lovers,

${:-*c}            expands the glob and returns an array
${${:-*c}//truc/}  see *c as a string so the result is *c

Clint and Peter explained me in another post that the subsitution is
applied first. So: 

print ${:-*c}
=> print *c
=> glob expansion

print ${${:-*c}//truc/}
=> print ${"*c"//truc/}
=> print "*c"

as i understood thinks, it's impossible to do what i expected.

ft gave a workaround on #zsh: print -l *c(e-'REPLY=${REPLY//truc/}'-)
but i'm just curious:

- did i correctly understand the problem ?
- is it a way to visualize those multipass transformations ? 
- is there a way to tell to zsh to work as expected ?

regards

-- 
Marc Chantreux
BibLibre, expert en logiciels libres pour l'info-doc
http://biblibre.com



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