home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / shell / 5097 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.6 KB  |  32 lines

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