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 5743 invoked from network); 23 Jun 2020 12:47:38 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 23 Jun 2020 12:47:38 -0000 Received: (qmail 13929 invoked by alias); 23 Jun 2020 12:47: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: Sender: zsh-users@zsh.org X-Seq: 24947 Received: (qmail 1724 invoked by uid 1010); 23 Jun 2020 12:47:31 -0000 X-Qmail-Scanner-Diagnostics: from bird.elm.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.212.17):SA:0(-2.0/5.0):. Processed in 1.65582 secs); 23 Jun 2020 12:47:31 -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.212.17 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-Relation-Well-Made: 4678a7c90ed7ef75_1592916412866_347056262 X-MC-Loop-Signature: 1592916412865:1933301728 X-MC-Ingress-Time: 1592916412865 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: <20200623120429.2c889b67@tarpaulin.shahaf.local2> Date: Tue, 23 Jun 2020 07:46:50 -0500 Cc: zsh-users@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20200623083703.GA13538@pooh.prefix.duckdns.org> <20200623112838.GB13538@pooh.prefix.duckdns.org> <20200623120429.2c889b67@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 7:04 AM, Daniel Shahaf = wrote: >=20 > Andreas Kusalananda K=C3=A4h=C3=A4ri wrote on Tue, 23 Jun 2020 13:28 = +0200: >> On Tue, Jun 23, 2020 at 11:55:20AM +0200, Mikael Magnusson wrote: >>> On 6/23/20, Andreas Kusalananda K=C3=A4h=C3=A4ri = wrote: =20 >>>> On Tue, Jun 23, 2020 at 01:23:55AM +0200, Mikael Magnusson wrote: =20= >>>>> Aliases are expanded on parse time, which means aliases defined in = a >>>>> file won't be usable in that same file. (Because it is parsed in = its >>>>> entirety before any of the code is actually run). =20 >>>>=20 >>>> If the alias is defined before the definition of the function, it = ought to >>>> work. =20 >>>=20 >>> As I already explained, it will not. >>>=20 >>=20 >> As Peter Stephenson explained, it depends. >>=20 >=20 > See also the ALIAS_FUNC_DEF option. My amateur 2 cents =E2=80=A6 I gave up on aliases with bash and never = tried them with zsh. Aliases are just weird oddities that have lots of special cases. Since = functions now exist (aliases came first in the global history of = shells), I don=E2=80=99t see any advantages to aliases and they have = many problems. I don=E2=80=99t know of anything an alias can do that a function = can=E2=80=99t?