home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / shell / 5150 < prev    next >
Encoding:
Text File  |  1992-12-23  |  2.2 KB  |  49 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!uchinews!machine!ddsw1!dattier
  3. From: dattier@ddsw1.mcs.com (DWT)
  4. Subject: Re: ksh autoload quirk
  5. Message-ID: <BzMMMF.4Dq@ddsw1.mcs.com>
  6. Date: Mon, 21 Dec 1992 20:37:26 GMT
  7. References: <BzDBn2.KAw@ddsw1.mcs.com> <WPM.92Dec18103702@exile.is.morgan.com> <1992Dec20.112016.14120@cas.org>
  8. Organization: Contributor Account at ddsw1, Chicago, Illinois  60657
  9. Lines: 38
  10.  
  11. lvirden@cas.org (Larry W. Virden) wrote in <1992Dec20.112016.14120@cas.org>:
  12.  
  13. | Here is what our ATT Toolchest man page says about FPATH:
  14. |           FPATH
  15. |                The search  path  for  function  definitions.   By
  16. |                default  the  FPATH directories are searched after
  17. |                the PATH  variable.   If  an  executable  file  is
  18. |                found, then it is read and executed in the current
  19. |                environment.  FPATH is searched before PATH when a
  20. |                function with the -u attribute is referenced.  The
  21. |                preset alias autoload preset alias (sic) causes a  func-
  22. |                tion with the -u attribute to be created.
  23.  
  24. And that's exactly what I encountered, so even if the behavior wasn't
  25. intentional I'm not the first to discover it.
  26.  
  27. Unfortunately, the man page here [ddsw1 runs Dell SVR4 v4, but I don't see
  28. Dell's name in the man page] says this:
  29.  
  30. | FPATH The search path for function definitions.  This path is
  31. |       searched when a function with the -u attribute is referenced
  32. |       and when a command is not found.  If an executable file is
  33. |       found, then it is read and executed in the current
  34. |       environment.
  35.  
  36. Note the ambiguous language.  "A when B and when C"; does that mean "A when
  37. B and also A when C" [i.e., A when (B or C)] or does it mean "A when both
  38. (B and C)"?  I'd have taken it to mean the latter.  Obviously the former
  39. interpretation is borne out this time, and there is nothing to indicate that
  40. the difference in search order.
  41.  
  42. Also, files in $FPATH for autoload don't have to be executable; read
  43. permission is enough.  The AT&T man page also says that execute permission
  44. is needed, but maybe in that ksh it is.
  45.  
  46. David W. Tamkin   Box 59297   Northtown Station, Illinois  60659-0297
  47. dattier@ddsw1.mcs.com    CompuServe: 73720,1570    MCI Mail: 426-1818
  48.