zsh-users
 help / color / mirror / code / Atom feed
From: Aryn Starr <whereislelouch@icloud.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh-users@zsh.org
Subject: Re: Get the result of the last glob
Date: Wed, 21 Aug 2019 19:10:02 +0430	[thread overview]
Message-ID: <721145FA-3F01-473F-8DEE-8047E5065A47@icloud.com> (raw)
In-Reply-To: <2630172a-ed53-48e8-b684-48b8bb59c5f6@www.fastmail.com>

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@daniel.shahaf.name> 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
>> 


  parent reply	other threads:[~2019-08-21 14:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 13:21 Aryn Starr
2019-08-21 14:31 ` Daniel Shahaf
2019-08-21 14:34   ` Daniel Shahaf
2019-08-21 14:40   ` Aryn Starr [this message]
2019-08-21 14:47     ` Daniel Shahaf
2019-08-21 20:54     ` Mikael Magnusson
2019-08-22  5:36       ` Aryn Starr
     [not found]       ` <6B392E5A-528B-4E73-8DF4-A10D6775D5FB__35805.0242810108$1566452299$gmane$org@icloud.com>
2019-08-22  7:32         ` Stephane Chazelas
2019-08-22  7:35           ` Aryn Starr
     [not found] <918ED85F-9DE5-4365-B962-45AD4AADDF46__5329.09398186661$1566393766$gmane$org@icloud.com>
2019-08-21 15:17 ` Stephane Chazelas
2019-08-21 15:43   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=721145FA-3F01-473F-8DEE-8047E5065A47@icloud.com \
    --to=whereislelouch@icloud.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).