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

Re: Get the result of the last glob



Aryn Starr wrote on Wed, 21 Aug 2019 14:40 +00:00:
> Thanks. I needed this to be non-interactive, and I indeed created a 
> function for it, I was just wondering if it was possible to get the 
> glob in a magic variable or sth, which it seems it is not.

Of course it's possible:

() { typeset -p argv } *
set -- *; typeset -p argv
l=( * )
for i in * ; typeset -p $i



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