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 30231 invoked from network); 23 Jun 2020 11:29:24 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 23 Jun 2020 11:29:24 -0000 Received: (qmail 844 invoked by alias); 23 Jun 2020 11:29:16 -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: 24945 Received: (qmail 28904 invoked by uid 1010); 23 Jun 2020 11:29:16 -0000 X-Qmail-Scanner-Diagnostics: from hekla.abc.se 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(158.174.61.227):SA:0(-1.9/5.0):. Processed in 1.627039 secs); 23 Jun 2020 11:29:16 -0000 X-Envelope-From: andreas.kahari@abc.se X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at abc.se designates 158.174.61.227 as permitted sender) Date: Tue, 23 Jun 2020 13:28:38 +0200 From: Andreas Kusalananda =?utf-8?B?S8OkaMOkcmk=?= To: Mikael Magnusson Cc: Frank Gallacher , "zsh-users@zsh.org" Subject: Re: Alias call in function fails... Message-ID: <20200623112838.GB13538@pooh.prefix.duckdns.org> Mail-Followup-To: Mikael Magnusson , Frank Gallacher , "zsh-users@zsh.org" References: <20200623083703.GA13538@pooh.prefix.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Jun 23, 2020 at 11:55:20AM +0200, Mikael Magnusson wrote: > On 6/23/20, Andreas Kusalananda Kähäri wrote: > > On Tue, Jun 23, 2020 at 01:23:55AM +0200, Mikael Magnusson wrote: > >> 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). > > > > If the alias is defined before the definition of the function, it ought to > > work. > > As I already explained, it will not. > > -- > Mikael Magnusson As Peter Stephenson explained, it depends. -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden .