Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Your showLatest script won't work unless all the files are in the current directory. ((foo|bar)(om[1,1]) is a valid glob, (/etc/passwd|/bin/ls)(om[1,1]) or even (./foo|./bar)(om[1,1]) are not. Commented Oct 21, 2015 at 8:52
  • @StéphaneChazelas Good point. Is there anything simpler than .(e\''reply=($files)'\'om) to sort an arbitrary array of files via a glob qualifier? Commented Oct 21, 2015 at 12:34
  • Could have been a nice trick, but .(e\''reply=($files)'\'om) doesn't work for me. I can't think of a straightforward way to do it. Commented Oct 21, 2015 at 15:42
  • @StéphaneChazelas My bad, applying almost any glob qualifier seems to simply sort in reverse, probably a side effect of how sorting is implemented. But oe does sort on the output of e, at least as of zsh 5.0.5. Annoying but doable. Commented Oct 21, 2015 at 17:30