Moin, sorry for returning so late,
=- David Korn wrote on Tue 10.Apr'12 at 10:30:43 -0400 -=
> > 2 cases:
> > - $PWD != $FPATH ==>> OK
> > - $PWD == $FPATH ==>> 'Q' is never loaded, executed, parsed.
> >
> > Why is that?
>
> I am unable to reproduce. Here is what I get.
>
> ================cut here=====================
> $ print ${.sh.version}
> Version JM 93u 2011-02-08
> $ cat caller
> FPATH=/home/dgk/jkf/bin/fun
> cd $FPATH || exit 1
> VARIABLE=empty
> alias ALIAS=dummy
> echo pre-autoload
> autoload Q
> echo post-autoload
> Q
> echo post-call
> echo $VARIABLE
> type Q ALIAS
> $ cat /home/dgk/jkf/bin/fun/Q
> VARIABLE=value
> alias ALIAS=COMMAND
> echo pre-func-def
> function Q { echo world ;}
> echo post-func-def
> $ ./caller
> pre-autoload
> post-autoload
> pre-func-def
> post-func-def
> world
> post-call
> value
> Q is a function
> ALIAS is an alias for COMMAND
> ================cut here=====================
>
> So Q is called with $PWD==$FPATH
Thanks for verifying, but I found an additional requirement:
set PATH to "...:" (trailing : for "use current dir"), then retry
the above. It fails for 93u+, too.
Somehow there seems to be a conflict between $PATH-$FPATH-$PWD, when
$PATH contains ".".
--
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users