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