If you move/change a shell script how to make bash forget about the old location?
E.g. I had a wrapper for ctags in /home/chris/bin which was called ctags. I discovered that I only needed the wrapper for Solaris and not for Linux so I moved my ctags from /home/chris/bin to /home/chris/bin/solaris which isn't on my path when I'm on a Linux system.
After moving it when I try running 'ctags' I get the error:-
bash: /home/chris/bin/ctags: No such file or directory
i.e. bash has remembered the path to ctags to save time, how do I tell it to start afresh? (There is a ctags on the PATH at /usr/bin/ctags)
In C-shell it's rehash but (not surprisingly) that doesn't work in bash.
Hi
On 27/09/2007, Chris G cl@isbd.net wrote:
i.e. bash has remembered the path to ctags to save time, how do I tell it to start afresh? (There is a ctags on the PATH at /usr/bin/ctags)
In C-shell it's rehash but (not surprisingly) that doesn't work in bash.
man bash has all the answers. I suggest looking at the bash hash built-in command.
-Srdjan
On Thu, Sep 27, 2007 at 11:06:44AM +0100, Srdjan Todorovic wrote:
Hi
On 27/09/2007, Chris G cl@isbd.net wrote:
i.e. bash has remembered the path to ctags to save time, how do I tell it to start afresh? (There is a ctags on the PATH at /usr/bin/ctags)
In C-shell it's rehash but (not surprisingly) that doesn't work in bash.
man bash has all the answers. I suggest looking at the bash hash built-in command.
You're absolutely right, how did I miss that? All I need is to say 'hash ctags' and it redoes its hashing so all is well.
Thank you.