From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1715 invoked from network); 19 Feb 2001 23:02:54 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Feb 2001 23:02:54 -0000 Received: (qmail 2701 invoked by alias); 19 Feb 2001 23:02:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13508 Received: (qmail 2689 invoked from network); 19 Feb 2001 23:02:46 -0000 Sender: opk Message-ID: <3A91978C.3145A884@u.genie.co.uk> Date: Mon, 19 Feb 2001 22:00:44 +0000 From: Oliver Kiddle X-Mailer: Mozilla 4.73 [en] (X11; I; Linux 2.2.16 i586) X-Accept-Language: en MIME-Version: 1.0 To: Zsh hackers list Subject: exported functions (was Re: 4.0.1-pre-1) References: <000201c09a3b$5b85d7a0$21c9ca95@mow.siemens.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Andrej Borsenkow wrote: > Speaking about compatibility, bash exports functions (can ksh do this as > well?). I was surprised to see that some people actually use it. The problem > is mostly on Linux, where sh == bash by default, so "sh compatibility" mostly > means "bash comaptibility". According to the ksh88 manual I have, functions and aliases can be exported but it doesn't work when I try it. pdksh's manual states that it did work in the original ksh and that the export attribute of functions is currently not used. ksh93's manual specically states that the -x option to alias is obsolete and says nothing about exported functions. So in short, ksh can't export functions. Note that bash can't export aliases. I can't think of many uses for exported functions but wouldn't have any objections. Bash compatibility isn't that vital to me personally. Higher on my wish list for new features after 4.0 would be the various ksh93 features we don't have like variable references, nested variable assignments and discipline functions. Oliver