On 1/30/21 6:50 PM, L A Walsh wrote:
Since this "https://tiswww.case.edu/php/chet/bash/POSIX" doesn't seem to be version specific, I'm assuming these are in the latest bash version. I don't understand the benefit of the differences involving hashed-commands and recovery behavior. It seemed like these behaviors may have served a purpose at one time, but now seem more likely to create an unnecessary failure case. First behavior: How is it beneficial for bash to store a non-executable in the command-hash?
Probably not very, but it's not all that harmful. The `checkhash' option overrides this. What's really wasteful is to put something non-executable in the hash table when `checkhash' is set, only to remove it the next time you try to execute it. I changed that a few weeks back.
And second, related behavior: Not searching for an alternative in the PATH if the old hashed value stops working.
Again, `checkhash' covers this. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/