This is the mail archive of the
mailing list for the Cygwin project.
Re: Solving: Quotes in $PATH not translated properly
- From: Michael A Chase <mchase at ix dot netcom dot com>
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>, Harald Kierer <Harald dot Kierer at astrum dot de>
- Date: Mon, 24 Feb 2003 09:24:25 -0800 (PST)
- Subject: Re: Solving: Quotes in $PATH not translated properly
- References: <8C6D4989662C304087C58904BAB721A54B73D4@Hermes.astrum.de>
On Mon, 24 Feb 2003 17:22:54 +0100 Harald Kierer <Harald dot Kierer at astrum dot de> wrote:
> a current problem when invoking cygwin is: if the Windows PATH
> variable has quoted paths then cygwin won't translate those paths to
> POSIX properly, so you end up with an incomplete $PATH:
> T:\bin>echo %PATH%
> "C:\Program Files\abc";[...]
Are the quotes absolutely necessary inside %path%? If not, removing
them would be a useful workaround.
> So when I start a login bash everything is nice:
> T:\src>bash --login
> [/t/src] $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/c/Program Files/abc:[...]
> My remaining problem:
> We launch a lot of scripts from the DOS Box, like 'sh script.sh'.
> This doesn't invoke the profile. How can I launch this path-parser-script
> every time a bash or ash gets started?
Just like you show above, with --login. -rcfile is also possible.
One problem with doing either blindly is that /etc/profile might
change the current directory. See
http://home.ix.netcom.com/~mchase/zip/Bash_This.reg for some example
"one liners" that work around that problem.
If the scripts expect to be called from a DOS prompt, something like
the following inside them might help:
if [ -z "$PS1" ]; then
It would be easier to launch your scripts from a normal bash prompt
if at all possible.
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html