command line prompt (need current directory)

Chet Ramey chet at cwns1.CWRU.EDU
Fri Sep 14 23:55:25 AEST 1990


In article <13669 at hydra.gatech.EDU> gt0178a at prism.gatech.EDU (BURNS,JIM) writes:

>Ksh allows you to export functions with (for me):
>
>typeset -fx cp ll man

This will not export the functions to separate invocations of ksh.  Only
shells `spawned' by ksh to execute scripts will inherit these function
definitions.  There is no way to export functions to separate invocations
of the shell; you must do it via the $ENV file.

>I'm not aware of any way to do it in sh, and haven't run across any csh's
>that support functions, per se (not aliases).

There aren't any.

>Most shells will search for a builtin before executing an alias or
>function. For a function that replaces the behavior of an external,
>specify the pathname for the 'inside' invocation of the command, as in:

The Korn Shell and Bash will do alias substitution first.  It's really the
last stage of token recognition rather than part of command execution.  For
bash, the order of lookup is function, builtin, file system (Posix is the
same way).  For ksh, it's builtin, function, file system.

Chet
-- 
Chet Ramey				``Levi Stubbs' tears run down
Network Services Group			  his face...''
Case Western Reserve University	
chet at ins.CWRU.Edu		



More information about the Comp.unix.shell mailing list