Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Get the result of the last glob
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.
> On Aug 21, 2019, at 7:01 PM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Aryn Starr wrote on Wed, 21 Aug 2019 13:22 +00:00:
>> ebook-convert * *.epub
>
> Assuming emacs keybindings, you can do:
>
> ebook-convert *<TAB>{,.epub}
>
> (where <TAB> will expand the glob)
>
> or
>
> ebook-convert * *<Ctrl+X>*.epub
>
> (where "<Ctrl+X>*" is the default binding for the expand-word widget, which will expand the glob)
>
> or even
>
> () { for 1; do ebook-convert $1 $1.epub; done } *
>
> which, unlike the previous examples, works for any number of files. (It's an anonymous function with arguments.)
>
>> Which I want expanded to:
>>
>> ebook-convert somebook.mobi somebook.mobi.epub
>>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author