Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Get the result of the last glob
- X-seq: zsh-users 24167
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: "Aryn Starr" <whereislelouch@xxxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: Get the result of the last glob
- Date: Wed, 21 Aug 2019 14:31:41 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:subject:content-type; s=fm1; bh=Lm0RDMJ hVABJLE1A4GxE5noY7FxWD64Z7e50IAzJ7yA=; b=T0YO4Z88Bsw6DOfFWNZQr0Q 9XGXUQb6BNeKadK00xnmrZKNizBcMvcjigQWBKAUj4zshVPzuJ16JdNP0zpfI82m pnyZqZRCZRGYFqPqEfiJcRHN3Fo8dsQSZkEgdjG6tceTuSMltMg1IjNS5jj0fnmo lpdGwV2W/o/ht7N9B3J1QlkjPibceBeeL4s5tNPxCq53MuldqFVJnFiVq+E5xvT7 sGGI4Cs27sf/ZjWvAP9YpNIDUUAb6umJre+ArA83o/fa63Vey4q6q/9bj83HN7JP BgeMRGv5mIWxpyaz8mFZviYHxI1dbUzNDOfnZ6yvK3Zpi6Y2VE0P2wspQDzirjA= =
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Lm0RDM JhVABJLE1A4GxE5noY7FxWD64Z7e50IAzJ7yA=; b=B8iX5+WD+pp2sqrdupXN0g pxwdk1jyhYTMojBIaAtZI0hCl06MUYaObAOFnByv3ybHWG6jE6RDM4C8zv4PURsn MzeW/Ysm1DCLkilxE88MmbrYXhvoFWhitiLnBPZe88AwDTf2L5vnEARL91rpMV3M 7uNMoxWybRAyMtMNH4QFdJ6HdTax4qIiVqclFBv9ZnV58uFx34M4pWDEixUuROFD 3Jdz01hmbxXpjXIHidiUAucKHhFPXRa+OHC2LhZw2EZei+tZKrm4PWAWp5fY+4U6 E/SJ5OChyAldvXkpitBPtbfDV0OBQbiXzpgm9adL39esKUav3RsrtWeNEcvH97hQ ==
- In-reply-to: <918ED85F-9DE5-4365-B962-45AD4AADDF46@icloud.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <918ED85F-9DE5-4365-B962-45AD4AADDF46@icloud.com>
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