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

Re: spaces in filenames should be a crime.



On 28/03/17 02:08 AM, Martin Richter wrote:

echo $(**/*(.om[1])


I think you are after

$ print -- **/*(.Nom[1])

Ha! You know I was actually speculating, that wasn't supposed to work even remotely, yet I see it was not far from reality -- zsh can and does make a list of the files, it does not only do it when 'helping' ls or some other binary. So ls is merely supplying extra information about the files as may be desired, it does not 'make' the list of files. That's residual DOSthink again -- ok the shell globs the filenames, but only 'with' ls, that is, ls 'asks' zsh to expand a list of files. NO! zsh creates the list all by itself ls or no ls. ls is a passive recipient, there is no 'request'. Yes?



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