From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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.4 Received: (qmail 5755 invoked from network); 23 Jun 2020 23:30:16 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 23 Jun 2020 23:30:16 -0000 Received: (qmail 16715 invoked by alias); 23 Jun 2020 23:30:06 -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: Sender: zsh-users@zsh.org X-Seq: 24952 Received: (qmail 26984 invoked by uid 1010); 23 Jun 2020 23:30:06 -0000 X-Qmail-Scanner-Diagnostics: from fossa.birch.relay.mailchannels.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25850. spamassassin: 3.4.4. Clear:RC:0(23.83.209.62):SA:0(-2.0/5.0):. Processed in 3.853947 secs); 23 Jun 2020 23:30:06 -0000 X-Envelope-From: pedz@easesoftware.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf1.mailchannels.net designates 23.83.209.62 as permitted sender) X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Hook-Society: 52aec57d3e7be8a6_1592954966646_4055483947 X-MC-Loop-Signature: 1592954966646:1568592242 X-MC-Ingress-Time: 1592954966645 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Alias call in function fails... From: Perry Smith In-Reply-To: <20200623225409.0380caad@tarpaulin.shahaf.local2> Date: Tue, 23 Jun 2020 18:29:23 -0500 Cc: Zsh Users Content-Transfer-Encoding: quoted-printable Message-Id: <31DB587E-DFAD-46F6-84A9-1419A9FADE99@easesoftware.com> References: <20200623120429.2c889b67@tarpaulin.shahaf.local2> <2982509.CQOukoFCf9@nbkamil> <0DAEBDBF-F680-4BE8-BF63-AEE98236F631@easesoftware.com> <20200623225409.0380caad@tarpaulin.shahaf.local2> To: Daniel Shahaf X-Mailer: Apple Mail (2.3608.80.23.2.2) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com > On Jun 23, 2020, at 5:54 PM, Daniel Shahaf = wrote: >=20 > Perry Smith wrote on Tue, 23 Jun 2020 16:14 -0500: >>> On Jun 23, 2020, at 11:03 AM, Bart Schaefer = > wrote: >>>=20 >>> The other thing is make replacements in contexts other than the >>> "command position" (global aliases). =20 >>=20 >> I=E2=80=99d really appreciate if you could give a few examples of = this. >>=20 >=20 > [[[ > diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo > index ada69c99a..bff5c4a18 100644 > --- a/Doc/Zsh/builtins.yo > +++ b/Doc/Zsh/builtins.yo > @@ -105,7 +105,16 @@ For each var(name) with a corresponding = var(value), define an alias > with that value. A trailing space in var(value) causes the next word > to be checked for alias expansion. If the tt(-g) flag is present, > define a global alias; global aliases are expanded even if they do not > -occur in command position. > +occur in command position: > + > +example(% print -rC1 foo bar ANNOTATE > +foo > +bar > +ANNOTATE > +% alias -g ANNOTATE=3D'| nl -ba' > +% print -rC1 foo bar ANNOTATE > + 1 foo > + 2 bar) >=20 > If the tt(-s) flag is present, define a suffix alias: if the command > word on a command line is in the form `var(text)tt(.)var(name)', where > ]]] >=20 > Is this sufficiently clear to be committed? There's already a > noderef(Aliasing) a few paragraphs below, which explains how aliases > are expanded before almost all other parsing (which is why the =C2=AB|=C2= =BB on > the RHS works), but it's perhaps not self-explanatory that nl(1) is an > external command. Ahh=E2=80=A6 ok. Thank you. I remember reading that now (before your = changes) but didn=E2=80=99t really ingest it.