From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id MAA27446 for ; Mon, 25 Nov 1996 12:28:52 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id UAA08696; Sun, 24 Nov 1996 20:20:19 -0500 (EST) Resent-Date: Sun, 24 Nov 1996 20:20:19 -0500 (EST) From: Zoltan Hidvegi Message-Id: <199611242240.XAA02931@hzoli.ppp.cs.elte.hu> Subject: Re: autoloading modules To: zefram@dcs.warwick.ac.uk (Zefram) Date: Sun, 24 Nov 1996 23:40:38 +0100 (MET) Cc: zsh-workers@math.gatech.edu In-Reply-To: <19781.199611241529@stone.dcs.warwick.ac.uk> from Zefram at "Nov 24, 96 03:29:38 pm" X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"jAzMh1.0.o72.DHFco"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2466 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > In order to support autoloading of modules that provide multiple builtins, > it would be helped by an option to zmodload that says "load this module, > but keep quiet if it's already loaded". The patch below adds such an > option, -i (for idempotent). To make use of it in zmodautoload, change > "zmodload" to "zmodload -i" above. Would not -q (quiet) be a better name for this option? And the same can be achieved by redirection stderr. > Zoltan, what is "zmodload -f" for? Well it is quite useless, it'll probably be removed. Originally I added this to test dlopen on Linux. The manual claims that if the same library is loaded twice the same handle is returned which is not true (at least libdl.so.1.8.2 does not behave this way). I think that modules should be identified by their name with the extension and pathname stripped and zsh should not allow loading two modules with the same name (even if they have different path name). I also like your other patch to compile in modules but this sed hack is quite unelegant. There must be a way to avoid that. Zoltan