cc: [email protected]
Subject: Re: tracked aliases
--------

> Hi,
> 
> It looks like ksh does not do anything when the trackall option is set
> (or not for that matter). A test script to demonstrate this:
> 
> ##############################################
> #!/bin/ksh
> export PATH=$PATH:.:/tmp
> 
> $ cat > $HOME/min_script.ksh
> echo home
> $ chmod a+x $HOME/min_script.ksh
> $ touch /tmp/min_script.ksh
> echo tmp
> $ chmod a+x /tmp/min_script.ksh
> 
> set +h
> cd
> pwd
> type min_script.ksh
> min_script.ksh
> cd /tmp
> pwd
> type min_script.ksh
> min_script.ksh
> cd
> pwd
> type min_script.ksh
> min_script.ksh
> cd /
> pwd
> type min_script.ksh
> min_script.ksh
> cd
> pwd
> type min_script.ksh
> min_script.ksh
> 
> ##############################################
> 
> Both 'type' output and the actual execution are broken since they do
> not really match at all. None of them look at SH_TRACKALL either.
> 
> I have attached a patch that implements all this. Please let me know
> if this is the right direction for the fix or if the code is already
> behaving as expected.
> 
> 
> Thanks,
> Siddhesh
> 
> -- 
> Siddhesh Poyarekar
> http://siddhesh.in
> 

tracked aliases were added for ksh88 and for compatibility the the Bourne
shell they were not on by default.

The POSIX standard allows the shell to remember the location of commands
until PATH is assigned to. So, in ksh93 while I left the trackall option in,
for backward compatibility with ksh88, I made the default track aliases and
ignored the option. 

As far as I remember, the only case I do not remember the location of
a command that I look up is with whence -a.

Now I should either make this clear in the documentation, or implement
disabling tracked aliases as you have done.

Can you give me a reason why you believe that it should be possible
to disable tracked aliases?

David Korn
[email protected]
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to