X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=lQ
	LLGUPqV+8OrJcHi/T22XLAMtgclVSrQjHar3zHKZ0auK8MrCjkA54869yW8OXWzF
	uPgJCv3BwupChHMHRHpC69AxiljhyXmQvzUh3CY4QPKBlcuJ1x/LB8c8PGiIAhLX
	QczcSGqCftd0eZeTDqsC7Jmv17xxBCDX1dxjk+bmk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=3VdAJcyY
	6VGq9jMfxildqnP3Ai8=; b=NXFpL9u6eqMwV6hwcW7a52z6vU0xePbfgN2WWrT/
	fq2sgkMnXmmXV1ovlqcfq+mmU58WvIY9jqRFM5/pQi5g9hv+tLlAwYsjmGiEXhRV
	t9bLVZmB33M3BTBleF2rnRjVbFl/gRjifLjvhIKUrU6FAetVN0fI9GkBmcrMD0yX
	+5Q=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-we0-f178.google.com
MIME-Version: 1.0
X-Received: by 10.180.165.15 with SMTP id yu15mr5955350wib.28.1391678097337; Thu, 06 Feb 2014 01:14:57 -0800 (PST)
In-Reply-To: <CAM9pMnM1=UnbcXRGefXiDVjVXJcVeNej=OGowbwwWBgHeG+MjQ@mail.gmail.com>
References: <CAM9pMnM1=UnbcXRGefXiDVjVXJcVeNej=OGowbwwWBgHeG+MjQ@mail.gmail.com>
Date: Thu, 6 Feb 2014 10:14:57 +0100
Message-ID: <CAEhDDbCG7i9GdEE1W2UL9egRdcA786u0xmwsKJXBD5HgXh5XcA@mail.gmail.com>
Subject: Re: $PATH contains dot but unclear where it comes from
From: Csaba Raduly <rcsaba@gmail.com>
To: cygwin list <cygwin@cygwin.com>
Content-Type: text/plain; charset=ISO-8859-1

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

