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.0 required=5.0 tests=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 3b9f79ac for ; Tue, 17 Dec 2019 10:15:38 +0000 (UTC) Received: (qmail 2609 invoked by alias); 17 Dec 2019 10:15:31 -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: 24568 Received: (qmail 11879 invoked by uid 1010); 17 Dec 2019 10:15:31 -0000 X-Qmail-Scanner-Diagnostics: from wout1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25663. spamassassin: 3.4.2. Clear:RC:0(64.147.123.24):SA:0(-2.6/5.0):. Processed in 3.230935 secs); 17 Dec 2019 10:15:31 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddtjedguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderredtnecuhfhrohhmpedfffgrnhhivghlucfuhhgrhhgrfhdfuceougdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfrrghrrghmpehmrghilhhfrhhomhepug drshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvnecuvehluhhsthgvrhfuihiivgep td X-ME-Proxy: X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-689-g5a57b82-fmstable-20191216v1 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20191214111751.ot4jd3o5esekqyfb@tarpaulin.shahaf.local2> <20191216035801.doeloio2cwauxguj@tarpaulin.shahaf.local2> Date: Tue, 17 Dec 2019 10:14:34 +0000 From: "Daniel Shahaf" To: zsh-users@zsh.org Subject: Re: suffix alias on a generated file name Content-Type: text/plain zzapper wrote on Tue, 17 Dec 2019 10:02 +00:00: > Daniel Shahaf wrote in > news:20191216035801.doeloio2cwauxguj@tarpaulin.shahaf.local2: > > > zzapper wrote on Sun, Dec 15, 2019 at 16:20:16 -0000: > >> Daniel Shahaf wrote in > >> news:20191214111751.ot4jd3o5esekqyfb@tarpaulin.shahaf.local2: > >> > >> > >> >> BUT how do I do that without the manual TABing? > >> > > > > I suppose you could wrap the accept-line widget to perform expansion: > > > > accept-line() { zle expand-word; zle .accept-line -- "$@" > > zle -N accept-line > > > > (untested) > > > Daniel nothing seems to work I think there must be something 'funny' about > the way a suffix alias works i.e it must be the first thing that the shell > sees. Aliases _are_ parsed very early (see zshexpn(1) near the top), but zle widgets run even earlier than that, before the command-line is parsed at all. What the example code does is change the meaning of pressing so it's like pressing . That's what you wanted to do, isn't it?