From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 63123e64 for ; Wed, 21 Aug 2019 14:40:49 +0000 (UTC) Received: (qmail 26128 invoked by alias); 21 Aug 2019 14:40:43 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24169 Received: (qmail 13484 invoked by uid 1010); 21 Aug 2019 14:40:43 -0000 X-Qmail-Scanner-Diagnostics: from st43p00im-ztdg10061801.me.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25545. spamassassin: 3.4.2. Clear:RC:0(17.58.63.170):SA:0(-4.3/5.0):. Processed in 1.947187 secs); 21 Aug 2019 14:40:43 -0000 X-Envelope-From: whereislelouch@icloud.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at icloud.com designates 17.58.63.170 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1566398406; bh=jki6Gm01j9H9fxQXqngUVeQhxZH/O+X9XJVSmhQFtGU=; h=Content-Type:Subject:From:Date:Message-Id:To; b=ClkFvXiCIkYGcs/TcVJcISugZns+BtNXebUg+5JolXVQv/W4Mk4KuSvVIMmj5Vk0b uEVpIQZHzPolmEXrqPQ8WWnKt77121eA9GofrG+EvK1GqY5Sh1mdzagUuliXwKTAea yhPYktghtLynOm6nSEu1C09CRH45sEyuQ6w3SrcBFB7rg9GFlhAGWhSWJbLX0xKMtD VP1wwAo8AsHMHiDxBlODdUiY02YMww0p/0u64IUsguROQ62V/y17A3zpOG9faZLNCi 3EYBdqLVz0ylvR2gmFL+dLdw6UKMNRt2P2nzo3QdcqvvsSAHZ7KuYzDJk0tmJvhN9L a/1aWEn91tbEw== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: Get the result of the last glob From: Aryn Starr X-Mailer: iPad Mail (16F203) In-Reply-To: <2630172a-ed53-48e8-b684-48b8bb59c5f6@www.fastmail.com> Date: Wed, 21 Aug 2019 19:10:02 +0430 Cc: zsh-users@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <721145FA-3F01-473F-8DEE-8047E5065A47@icloud.com> References: <918ED85F-9DE5-4365-B962-45AD4AADDF46@icloud.com> <2630172a-ed53-48e8-b684-48b8bb59c5f6@www.fastmail.com> To: Daniel Shahaf X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-21_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=881 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1812120000 definitions=main-1908210159 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 v= ariable or sth, which it seems it is not. > On Aug 21, 2019, at 7:01 PM, Daniel Shahaf wrote:= >=20 > Aryn Starr wrote on Wed, 21 Aug 2019 13:22 +00:00: >> ebook-convert * *.epub >=20 > Assuming emacs keybindings, you can do: >=20 > ebook-convert *{,.epub} >=20 > (where will expand the glob) >=20 > or >=20 > ebook-convert * **.epub >=20 > (where "*" is the default binding for the expand-word widget, whic= h will expand the glob) >=20 > or even >=20 > () { for 1; do ebook-convert $1 $1.epub; done } * >=20 > which, unlike the previous examples, works for any number of files. (It's= an anonymous function with arguments.) >=20 >> Which I want expanded to: >>=20 >> ebook-convert somebook.mobi somebook.mobi.epub >>=20