From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23466 invoked by alias); 19 Mar 2018 00:06: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: 23260 Received: (qmail 28471 invoked by uid 1010); 19 Mar 2018 00:06:12 -0000 X-Qmail-Scanner-Diagnostics: from mta01.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.30):SA:0(-2.6/5.0):. Processed in 12.504959 secs); 19 Mar 2018 00:06:12 -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=Pgl7iZmjUY2VARyCmtsA:9 a=QEXdDO2ut3YA:10 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> <9001d78e-91fd-8505-518f-27247462d3c2@eastlink.ca> <20180315214450.sle4bsb3ab6dt56i@prometheus.u-strasbg.fr> <180318160107.ZM8955@torch.brasslantern.com> From: Ray Andrews Message-id: <8b81b4a3-0730-91fc-615e-222ad0a09946@eastlink.ca> Date: Sun, 18 Mar 2018 17:05:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-reply-to: <180318160107.ZM8955@torch.brasslantern.com> Content-language: en-CA On 18/03/18 04:01 PM, Bart Schaefer wrote: > On Mar 16, 11:56am, Ray Andrews wrote: > } > > Sure, but it doesn't keep track of whether "c" is the ONLY function > that came from that file. It wouldn't be safe to automatically re- > source just any such file. Telling zsh which files can be sourced > that way is the job of "autoload". I sorta see that.  When I tried autoload a while back it was a bit of a disaster because my functions mostly have subsidiary functions in the same file and I wanted them all autoloaded at the same time, which IIRC autoload does not do.  But, given that a file is sourced or not sourced I get a glimmer now of why it better only have one function given what you've just said.  The logical level of the file is relevant to sourcing but not relevant to anything else. And the bureaucracy of trying to keep it all straight would be onerous. > > Although it does seem ripe for unintended side-effects. Yeah, and I guess any user of aliases ( or macros as in C ) knows that, and knows it's their hide if they are not careful.   Anyway 'eval alias' is the exact and intuitive answer to my original, and it's cool that we can have it either way.