home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!spool.mu.edu!uwm.edu!cs.utexas.edu!asuvax!ncar!uchinews!machine!ddsw1!dattier
- From: dattier@ddsw1.mcs.com (DWT)
- Subject: ksh autoload quirk
- Message-ID: <BzDBn2.KAw@ddsw1.mcs.com>
- Date: Wed, 16 Dec 1992 20:01:49 GMT
- Organization: Contributor Account at ddsw1, Chicago, Illinois 60657
- Lines: 22
-
- ksh 11/16/88d under Dell SVR4 4.0 here on ddsw1 and the ksh running on a 3B2
- on gagme recognize any filename in a directory in $FPATH as an undefined
- function whether or not that name has been declared for autoload with
- "autoload" or "typeset -fu."
-
- But there is a difference when a file in $FPATH has the same name as an
- executable file in $PATH. If the undefined function has been formally
- declared with "autoload" or "typeset -fu," then ksh interprets an appearance
- of that name on the command line as a reference to the function. If the
- undefined function has not been declared but is recognized as such solely by
- dint of lying in $FPATH, then an appearance of the name on the command line
- is taken by ksh parser to mean the executable in $PATH (unless the function
- has actually been loaded with the . command or by a call to another function
- in the same file to whose name the file is linked).
-
- Is that the correct behavior? Is a file name in $FPATH that hasn't been
- declared for autoload supposed to be recognizable at all as an undefined
- function? I haven't seen anything about that (nor about a difference in
- precedence from a declared undefined function) in the ferkakte manual.
-
- David W. Tamkin Box 59297 Northtown Station, Illinois 60659-0297
- dattier@ddsw1.mcs.com CompuServe: 73720,1570 MCI Mail: 426-1818
-