This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: bash - command - PATH question


On 05/19/2010 12:45 PM, Rockefeller, Harry wrote:
> After more testing, where
> 
> "export PATH=$PATH:~/bin" only exists in .bash_login.
> 
> If I run 'foo' from my login directory it works.
> If I then cd to a different place I get the error
> 
> bash: ./bin/foo: No such file or directory

Eric Blake> What does 'type foo' say?  Is it hashed?  What is $HOME?  Could you accidentally have set home to a relative path, in which case ~ is relative instead of absolute?  What does 'echo $PATH' say; are there any relative paths in that listing?

$ type mysvn
mysvn is hashed (./mysvn)

Cat's out of the bag.  foo really is a bash script to run my common svn commands.

$ echo $HOME
/cygdrive/c/DOCUME~1/harryr

$ cd ~ ; pwd
/cygdrive/c/DOCUME~1/harryr

$ echo $PATH
[gives a very long path.  Yes, ./ and ./bin are present but are the only
relative paths in the listing.]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]