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

The (e) glob flag and 'return'



Consider this:

schaefer<503> print *.*(e['echo $REPLY'])
config.log
config.status
config.h
stamp-h.in
config.modules
config.cache
config.h.in
config.cache config.h config.h.in config.log config.modules config.status stamp-h.in
schaefer<504> 

This strikes me as odd:

schaefer<504> print *.*(e['echo $REPLY; return'])
config.log
config.cache config.h config.h.in config.log config.modules config.status stamp-h.in
schaefer<505> 

I would have expected that either the two were the same, or that the latter
would pass only config.log to "print".  How does "return" manage to cause
the subsequent evaluations to be no-ops but not errors?



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