All the suggestions worked.

1. I put everything in .bash_profile (just easier)
2. I have the following statements in my _vimrc

set shell=C:/cygwin/bin/bash 
set shellxquote=\" 
set shellcmdflag=-c 
let $BASH_ENV='~/.bash_profile 

-----Original Message-----
From: A.J.Mechelynck [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 23, 2006 7:06 PM
To: Gerald Lai
Cc: Eric Arnold; Furash Gary; Gary Johnson; [email protected]
Subject: Re: How to get cygwin command line to know where it is

Gerald Lai wrote:
> On Wed, 24 May 2006, A.J.Mechelynck wrote:
>
>> Eric Arnold wrote:
>>> Off hand, I can't remember the exact name, but I think that there is

>>> a special rc filename that is executed even when it isn't a login 
>>> shell.....
>> [...]
>>
>> Yes, I think so too, and I don't remember it offhand either, but "man

>> bash" (which is quite long for a manpage) will tell you.
>
> Perhaps it's called ".bashenv"? Not sure. I use ZSH. It's equivalent 
> is ".zshenv".
> --
> Gerald
>
>
As said under INVOCATION in the bash manpage:

Login shell: /etc/profile (if found), then the first one (if any) found
readable among ~/.bash_profile, ~/.bash_login, ~/.profile (all this
unless --noprofile). At exit: ~/.bash_logout (if found).

Non-login interactive shell: ~/.bashrc (if found) unless --norc

Non-interactive shell: does as if executing if [ -n "BASH_ENV" ]; then .
"$BASH_ENV"; fi but doesn't search the $PATH

There are more details about what bash does when invoked as sh, when
invoked in posix mode, when invoked by the remote shell daemon, or when
invoked in suid mode.

Under FILES, two additional files (for readline initialization) are
mentioned.


Best regards,
Tony.

Reply via email to