Re: Auto-update program cache feature
On Wed, Oct 3, 2018 at 11:20 PM Jeffrey Walton wrote: (...) > How Bash achieves it is an implementation detail left to the experts. > I made a few suggestions that don't seem to fit well. That's OK > because Bash internals is not my area of expertise. I think it's important to always consider the cost (in terms of implementation complexity and maintenance) of a feature we request from a free software program :) > Architecturally each instance of Bash is an object could receive a > "clear cache" message. How it is achieved does not matter to me. What > is important is, the right thing is done to relieve users from the > extra work for the common case. This paragraph contradicts what you said earlier. You keep suggesting that Bash should adopt this global message passing system where every instance of the shell can broadcast messages to each other... that is EXTREMELY complicated. Anyways, I should've read the manual before replying to this email thread. There's already a mechanism in place for what you want, it's the `checkhash' shopt.
Re: Auto-update program cache feature
On 10/3/18 4:45 PM, Jeffrey Walton wrote: > Hi Everyone, > > I noticed a fair number of new Linux users have trouble with stale > program caches. Users install a package from a package manager or > sources and then are confused when the new package is not used. They > do not realize they need to run 'bash -r'; and most don't know where > to begin searching. OK, let's consider this. There are three cases: 1. A new program gets installed with the same name as an existing one, in the same directory. 2. A new program gets installed with the same name, but in a different directory in $PATH (and before the existing one). 3. A new program gets installed with a new name. (I'm putting aside the program deletion case.) You're saying that the seond scenario is most common, and common enough that we should develop a complex solution for it? I'd have to see more data before I'd accept that. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/