Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

exported functions (was Re: 4.0.1-pre-1)

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.


Messages sorted by: Reverse Date, Date, Thread, Author