From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8855 invoked by alias); 21 Sep 2015 04:18:47 -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: X-Seq: 20612 Received: (qmail 10083 invoked from network); 21 Sep 2015 04:18:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=oyVyj5e2j/lzKxQ821JM5e/Kfexfg/Xs5v5QUJcs4x4=; b=U1Atx+GuHzNuIN6bQ2P6iBiwIJmYXS2lfhbqr3BqGDJxFX6EJLjYKLE7WyF1uSrQVb S4KDb/z6WKOCLH5JN3ODot8hW9XI2rjHmYgtzZ2/ZV36IN0rD0wlGlqW733uKqQY6DLb 84XDHhId5teQ8SEi6foSv6w6Cn+IA76y/HOGY6mZeWZqbH98NQTIhFXUM9QxUkYsupFy tC8+bcWZNhsvjic6y9wmg2X5t6BMzSjAteLvI1YJpUyMy478hED9Q5Q3qPRI2MeucqBX YooY/Jw8XNR9wtf0PtO9ICujjdS+gRR+gZMVDdmTtjou8ESSM5zm0V0veUtWzOZNZ7Y3 qTqA== X-Gm-Message-State: ALoCoQkorrqR2t/mcXKlSHN9xHuC8yQ3hbtEUWeG0mpxNeY0OAa9oHRmsq2y1NAx9TE6JAlA4RMA X-Received: by 10.182.33.39 with SMTP id o7mr10148272obi.42.1442809123881; Sun, 20 Sep 2015 21:18:43 -0700 (PDT) From: Bart Schaefer Message-Id: <150920211840.ZM31871@torch.brasslantern.com> Date: Sun, 20 Sep 2015 21:18:40 -0700 In-Reply-To: <55FF3F7E.4060906@eastlink.ca> Comments: In reply to Ray Andrews "Re: autoload" (Sep 20, 4:21pm) References: <55FAE223.2080502@eastlink.ca> <150917103419.ZM10067@torch.brasslantern.com> <150918171441.ZM27212@torch.brasslantern.com> <55FD7982.9030505@eastlink.ca> <150919092922.ZM28214@torch.brasslantern.com> <55FDA5D3.9020304@eastlink.ca> <150919142243.ZM23634@torch.brasslantern.com> <55FE04AD.1070304@eastlink.ca> <150919224120.ZM4736@torch.brasslantern.com> <55FF3F7E.4060906@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: autoload MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 20, 4:21pm, Ray Andrews wrote: } } But you know what's in my head--something that's the equivalent of } 'just sourcing' your functions, but doing it from precompiled code, } and not pre-loading anything at all, but doing it only when the } function is actually called. Except for the point that "just sourcing" doesn't actually call the function, everything you wrote is what DOES happen as long as the functions are defined in separate files. Because the language is interpreted, the shell itself can't decompose a file into individual function entry points the way e.g. a linker can for a shared object. Requiring the file basename to be the same as the entry point name is the most obvious way to handle this. } You know Bart, with all the time you've spent on this, you could have } written that HOWTO ;-) The problem is, I wouldn't have known what to write.