cc: [email protected]
Subject: Re: Re: [ast-users] $FPATH function inconsistency based on current dir
--------
> 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 ".".
>
I am able to reproduce the problem with ksh93u, Version JM 93u 2011-02-08.
However, the problem is gone with ksh93u+, Version AJM 93u+ 2012-07-24.
David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users