From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 791 invoked by alias); 17 Mar 2018 22:47:55 -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: 23256 Received: (qmail 3342 invoked by uid 1010); 17 Mar 2018 22:47:54 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr0-f181.google.com 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(209.85.128.181):SA:0(-1.9/5.0):. Processed in 1.085796 secs); 17 Mar 2018 22:47:54 -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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=5yY3yRrz+vyB1NlXflebexpSkdys4638JmXmUJR9XUg=; b=NwqsH1zxtx89hGD2dhIeB2noO+8qddwDvlPPaOYQs/3C6NfrSI+om21Hy1Fm91clc+ sfmJ17yxoNXrX3oQdWVO+ug/Mvct3knpiHxT4l6GU4juRn/TYRVc5yTwXPQfTVvmIOpb 684UqEoXt7tNv9RwMwT3ieyixOfd9cO+Xp7XoMFhK6cefYb16VU1EjhQG5raAjoV6iOB 5Hg2JlhP7bCXzFwNS9S7aLBmZQoOX7MhnUAEDCz1bQuWTDIDuCMIjOAR46p33X8720T5 LETiUOTEu14F12M8a3NpLkt5iDmXPU0wNwfBOpdZs4QHOMPZ70z136LVr6GG7ZZexUYd DrzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=5yY3yRrz+vyB1NlXflebexpSkdys4638JmXmUJR9XUg=; b=I1dd3JQvtd1zCMF/s1aIWtsmRzQzLc83Twf0mhZ2h30qw9v2pP7MS+clT9ZE/w8T1Q 7DOaSMxiv47kBPutib72Bm6Gc1LXMnMJgYD/ID0EEQW4b3cLCd16TdHDxrmNVEhqEwBD p4G9zIDPMpzXzfLj2avsXsF8ZTdW5RW6HJJdibDkjFCktNoe1qWxdULci1XUUR3fsTts nGbrN+ri0B4zZwWyHcI+EVx8wVI18MTehY5pYn3cHhsXa3BE4j+GQUVYXINNQjAwx0tK 0wpQyc4Dyo8E65DosY5FI2o9m8kB77bTve9R4vga5+OhPGOi4Te6+RY1wVBw6bY73S8T zrYA== X-Gm-Message-State: AElRT7HBF7TZl//MkZ0C0ioXKYdpyEdcjWpHRThW2SkvkqCI+COHBXrq Y74yRTlt0BdPykk2J0oV6h9ZIQ== X-Google-Smtp-Source: AG47ELvNkfOQe/RHS0tURezdwLJOVg+MPSsspCawoCKhKwuDudXmwBZTfxYp7x5qrk/UDebNqI2pEQ== X-Received: by 10.223.146.230 with SMTP id 93mr5111077wrn.241.1521326869396; Sat, 17 Mar 2018 15:47:49 -0700 (PDT) Date: Sat, 17 Mar 2018 22:47:47 +0000 From: Stephane Chazelas To: Ray Andrews Cc: Zsh Users Subject: Re: real time alias? Message-ID: <20180317224747.GA1927@chaz.gmail.com> Mail-Followup-To: Ray Andrews , Zsh Users References: <98aa0638-97ed-dfe0-8dd2-39129d02c084__39937.2481661432$1521136270$gmane$org@eastlink.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98aa0638-97ed-dfe0-8dd2-39129d02c084__39937.2481661432$1521136270$gmane$org@eastlink.ca> User-Agent: Mutt/1.5.24 (2015-08-30) 2018-03-15 10:51:47 -0700, 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 always use eval: $ f() { eval 'myalias 1'; echo done; } $ alias myalias=echo; f 1 done $ alias myalias=return; f $ echo $? 1 -- Stephane