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

Re: Get the result of the last glob



2019-08-22 10:06:51 +0430, Aryn Starr:
> What’s top posting?

See https://en.wikipedia.org/wiki/Posting_style

Your lines are also too long (72 recommended maximum, so it
takes a few quoting layers to get to 80, the standard terminal
width), but that's probably down to you using an Apple mail
client. And I suppose those recommendations (including
top-posting) make less sense now that people use mobile phones
to read their emails (maybe not their emails about zsh though).

> 
> Can’t $lastglob be available in the same command? It would be in the same fork, I imagine …
> `command * -d $lastglob`
[...]

$ lastglob=(); print -r -- *(e['lastglob+=($REPLY)']) /(e['reply=($^lastglob.epub)'])
file1 file2 file1.epub file2.epub

See also:

$ print -r -- *(e['reply=($REPLY $REPLY.epub)'])
file1 file1.epub file2 file2.epub

-- 
Stephane



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