~ $ which mysql /usr/local/mysql/bin/mysql ~ $ alias live='mysql -uuser -p -hmyhost.example.com -P1337 database' ~ $ live bash: /usr/bin/mysql: No such file or directory Reproducible: Always Steps to Reproduce: 1. install an app in a 'nonstandard' location 2. define an alias to that app 3. run the alias Actual Results: bash: /usr/bin/mysql: No such file or directory Expected Results: Enter password: in my .bashrc file I have export PATH=$PATH:/usr/local/mysql/bin
Does 'hash -d mysql' fix it?
(In reply to comment #1) > Does 'hash -d mysql' fix it? Indeed it does. ???
do you use bash-completion ?
Your shell does some caching to avoid having to look for programs every time you run them. The 'hash' built-in lets you tinker with this. This is fairly standard and allowed by POSIX: http://www.opengroup.org/onlinepubs/000095399/utilities/hash.html So, it's a feature, not a bug.