From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13721 invoked by alias); 16 Mar 2018 17:52:12 -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: 23252 Received: (qmail 26891 invoked by uid 1010); 16 Mar 2018 17:52:11 -0000 X-Qmail-Scanner-Diagnostics: from aurora-borealis.phear.org 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(94.242.205.164):SA:0(-1.9/5.0):. Processed in 7.033515 secs); 16 Mar 2018 17:52:11 -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,SPF_PASS, T_DKIM_INVALID,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: khatar@phear.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: amavisd-new at phear.org DKIM-Filter: OpenDKIM Filter v2.10.3 aurora-borealis.phear.org 68840112CE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=phear.org; s=20180217; t=1521222719; bh=92JUtfqtu+ulwATeGbv5CjgseU+pCOI6s6AkuQGj780=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TgsZC0UyL/jpk27baS0kGq39vH9qOKuINVU9Mnx7SS7Ss5uI8IlK66zeExdLsvkCK U/Bm535WEKtLghWlBOTr7XJjNRx0Y7nrFevM/dvtbcyzFLkV3m4DDFdwmWB0OMWILn 4qpnJ8kKXHUBYEvqawDNNKmmm3JDZS0kG3Qt1E5HIYwHWlrk8YI7LdjMFlPVmpPR1D 1lGHbKUMJJ/nFHnRby5T/D+6qFriji89YLp3Mw3NmQPdoSAWsG+5mdU1juCEBOauMn xxtd5kF2eTXtl65a3Q4z00DQNcTOczIIzPVVs2cQjdv64uUx5IE9UpZw/uCQqfdGx7 v646ePH2A7t8g== Date: Fri, 16 Mar 2018 18:51:58 +0100 From: Marc Chantreux To: Justin M Wozniak Cc: zsh-users@zsh.org Subject: Re: real time alias? Message-ID: <20180316175157.4ivasht4mv5ajv4t@prometheus.u-strasbg.fr> References: <98aa0638-97ed-dfe0-8dd2-39129d02c084@eastlink.ca> <9001d78e-91fd-8505-518f-27247462d3c2@eastlink.ca> <20180315214450.sle4bsb3ab6dt56i@prometheus.u-strasbg.fr> <20180315214618.5exweubdq3d5akzo@prometheus.u-strasbg.fr> <0d176b63-3e79-ddd3-dcfa-03bed94db0e2@mcs.anl.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0d176b63-3e79-ddd3-dcfa-03bed94db0e2@mcs.anl.gov> User-Agent: NeoMutt/20170113 (1.7.2) Hi Justin, On Fri, Mar 16, 2018 at 12:19:03PM -0500, Justin M Wozniak wrote: > Is there a way to have aliases work as macros? the point i was trying to emphasize in my last mail is that aliases really are macros (as preprocessor macros ... not hygenic ones ...) that can be redefined (from a user perspective: i rarely dove into the zsh code). if you want to see that in action, `which` can help alias foo='echo this is it' bar () { print hello foo } alias foo=booog which bar outputs the content of the function where you can see that * there is no more mention of 'foo' * foo is substitued with the value of foo at the time the function was defined bar () { print hello echo this is it } is this what you asked for ? > For example, can some > modification of warn_ () be used to return from the calling function? can you give an exemple of what you would like to get ? hth marc