touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #41112
[Bug 1399948] Re: Commands on found if both ./bin and ~/bin in PATH
Thanks. That was indeed the problem. I suspect that somewhere along
the line the checkhash option went from default on to default off. I
merely need to set it to on in my .profile to get the behavior I expect.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1399948
Title:
Commands on found if both ./bin and ~/bin in PATH
Status in bash package in Ubuntu:
New
Bug description:
I use (and have been using for 20 years or so) a path variable that looks like
PATH=".;./bin;~/bin;$PATH"; export PATH
This PATH should execute in priority: project specific commands (in the working directory, or the bin
subdirectory of the working directory), my personal commands (in my $HOME/bin folder) and then system commands.
The problem seems to be that when I start a shell in my home directory, it will cache the location of commands in ~/bin
as if they were in ./bin and then will be unable to find them if I cd out of my home directory.
For example, I have a personal command called SlideShow:
Here is a short example:
ralmond@Limu:~$ file ~/bin/SlideShow
/home/ralmond/bin/SlideShow: POSIX shell script, ASCII text executable
ralmond@Limu:~$ # Works fine if I execute it from home directory
ralmond@Limu:~$ SlideShow Pictures/
^C [Working as expected]
ralmond@Limu:~$ cd Pictures/
ralmond@Limu:~/Pictures$ #But if I change directory it does not work.
ralmond@Limu:~/Pictures$ SlideShow Pics
bash: ./bin/SlideShow: No such file or directory
ralmond@Limu:~/Pictures$ #If I start the shell in a directory other than home it works
ralmond@Limu:~/Pictures$ bash
ralmond@Limu:~/Pictures$ SlideShow Pics
^C [Working as expected]
I suspect that it is some cache which is not properly getting reset.
Here are my system details:
ralmond@Limu:~/Pictures$ lsb_release -rd
Description: Ubuntu 14.04.1 LTS
Release: 14.04
ralmond@Limu:~/Pictures$ apt-cache policy bash
bash:
Installed: 4.3-7ubuntu1.5
Candidate: 4.3-7ubuntu1.5
Version table:
*** 4.3-7ubuntu1.5 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
4.3-6ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
ralmond@Limu:~/Pictures$ ^C
ralmond@Limu:~/Pictures$
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1399948/+subscriptions
References