This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: $PATH contains dot but unclear where it comes from
- From: Csaba Raduly <rcsaba at gmail dot com>
- To: cygwin list <cygwin at cygwin dot com>
- Date: Thu, 6 Feb 2014 10:14:57 +0100
- Subject: Re: $PATH contains dot but unclear where it comes from
- Authentication-results: sourceware.org; auth=none
- References: <CAM9pMnM1=UnbcXRGefXiDVjVXJcVeNej=OGowbwwWBgHeG+MjQ at mail dot gmail dot com>
Hi Robert,
On Thu, Feb 6, 2014 at 10:01 AM, Robert Klemme wrote:
> Hi,
>
> in cygwin64 on Win 7 64 bit I find "." in $PATH:
>
> $ echo "$PATH" | tr : \\n | egrep '^\.$'
> .
>
> However, I was not able to detect where this came from. It's neither
> in the Windows system environment variables nor in the user
> environment variables - as you can also see on a cmd prompt:
Windows always looks into the current directory when searching for
programs, so '.' is usually not in the Winows version of PATH (which
Cygwin imports).
Almost certainly, the dot was put into the PATH by one of the Bash
initialization files. Here are some off the top of my head (`info
bash` , 6.2 Bash startup files, has the complete list).
/etc/profile
/etc/bash.bashrc
~/.bash_profile
~/.profile
~/.bashrc
You can try running
bash -x --login
This will spew the shell commands being executed while interpreting
the startup scripts (make sure you have a large scroll-back buffer :)
Alternatively
bash -x --login > bash_init.txt 2>&1
then type 'exit' blindly into the terminal (maybe 'tee' would work
better but I don't have access to Cygwin right now).
If you saved to a file, you can grep for PATH and try to identify
which initialization file put the dot in.
HTH,
Csaba
--
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
--
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