From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4330 invoked by alias); 15 Mar 2018 18:13:26 -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: 23245 Received: (qmail 11708 invoked by uid 1010); 15 Mar 2018 18:13:26 -0000 X-Qmail-Scanner-Diagnostics: from mta04.eastlink.ca by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(24.224.136.10):SA:0(-2.6/5.0):. Processed in 5.97485 secs); 15 Mar 2018 18:13:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: rayandrews@eastlink.ca X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=utf-8; format=flowed X-Authority-Analysis: v=2.3 cv=OKgJIxSB c=1 sm=1 tr=0 a=RnRVsdTsRxS/hkU0yKjOWA==:117 a=RnRVsdTsRxS/hkU0yKjOWA==:17 a=IkcTkHD0fZMA:10 a=gir0-LH0AAAA:8 a=J1W7JS55FZj2F_VN608A:9 a=QEXdDO2ut3YA:10 a=aLewGyoHDmJ4ULJHWpSz:22 X-EL-IP-NOAUTH: 24.207.101.9 Subject: Re: real time alias? To: zsh-users@zsh.org References: <98aa0638-97ed-dfe0-8dd2-39129d02c084@eastlink.ca> From: Ray Andrews Message-id: <9001d78e-91fd-8505-518f-27247462d3c2@eastlink.ca> Date: Thu, 15 Mar 2018 11:13:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-reply-to: Content-language: en-CA On 15/03/18 10:57 AM, Jérémie Roquet wrote: > 2018-03-15 18:51 GMT+01:00 Ray Andrews : >> If a function calls an alias, if the alias changes, the function must be >> resourced, yes? That makes nothing but sense sincethe alias is what it is >> at sourcing. An executed script uses the alias in 'real time'. But, is >> there a way to make a function also use the real time value of an alias? > You can use a function instead of an alias: > Sure, I was just wondering if it was possible at all with an alias. I expect not.  That's rather like asking for square circles but you don't know until you ask, there might be some option or something whereby a function is instructed to grab an alias at runtime sorta the way the value of a variable is grabbed at runtime.  It sounds like something that could be doable even it it isn't actually implemented right now.  With interpreted code I'd expect it is theoretically possible.