Henk Langeveld wrote:
> Roland Mainz wrote:
> > Is there any default location for loadable shell functions used by
> > ksh/bash/zsh/etc. ? AFAIK these shells all support loadable functions
> > (more or less) but do not seem to provide a "default" location similar
> > to /usr/include/ (for system headers) for for functions... or is/was
> > there something like that ?
> 
> .../include is for interfaces.  I'd opt for .../lib, which is where all
> code goes that is not invoked from the command line.

Mhhh... but these are no full scripts, these are script fragments which
are "sourced" (or better: "included") at script runtime. At least in
Solaris /usr/include/ contains Fortran includes and even some plugin
hackery for FireFox...

> /usr/lib/sh/... ?

What about:
- /usr/lib/shell/ as basename
- /usr/lib/shell/posix/ for POSIX shell functions and script fragments
- /usr/lib/shell/ksh/ for ksh93 shell functions and script fragments
- /usr/lib/shell/zsh/ for zsh shell functions and script fragments
- /usr/lib/shell/csh/ for csh shell functions and script fragments
etc.

...and a mandatory subdir layout of similar to "com/kornshell/math/" for
math functions from kornshell.com (or com/sun/on/misc/ for "misc" shell
functions from sun.com for OS/Net, e.g.
/usr/lib/shell/ksh/com/sun/misc/etc_profile_functions.sh # would contain
functions used by /etc/profile on demand). That would avoid possible
clashes between institutions/vendors if they want to deploy their own
shell function libraries.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to