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

Re: PATCH: trailing components



Peter Stephenson wrote on Tue, 18 Jun 2019 13:55 +00:00:
> to be clear, what I was hoping for and lacking was something along the
> lines of:
> 
> echo /blah/blah/blah/**/*.oogabooga(<stuff-here>)

What about
.
    echo /blah/blah/blah/**/*.oogabooga(e.:t 2.)
.
after defining «function ":t" { … }» using one of the previous snippets?
You could even define curried versions, «_t2() { :t 2 "$@" }», for use
with the «(+_t2)» syntax.

> even if <stuff-here> wasn't quite as short as :t2.  I could live with a
> few more characters but a loop or complicated substitution would lead me
> to propose adding the new code instead.

I'm not opposed to adding the new code; just brainstorming on alternatives.

Cheers,

Daniel



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