Try this: set shell=C:/cygwin/bin/bash let $BASH_ENV = '~/.bashrc' let &shellcmdflag='-c'
On 5/23/06, Eric Arnold <[EMAIL PROTECTED]> 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..... On 5/23/06, Furash Gary <[EMAIL PROTECTED]> wrote: > Just tried it and ran into the problem I thought I would. Removing > login eliminates the problem of it not knowing "where it is", but it no > longer runs .profile and so on, so as a result it's missing my changes > to the path, aliases, etc. > > Hmm... > > -----Original Message----- > From: Gary Johnson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 23, 2006 3:14 PM > To: vim@vim.org > Subject: Re: How to get cygwin command line to know where it is > > On 2006-05-23, Furash Gary <[EMAIL PROTECTED]> wrote: > > I'm using VIM on windows with cygwin. In my _vimrc I've got the > > following > > > > " automatically swithc directories > > set autochdir > > > > " For cygwin shell > > set shell=C:/cygwin/bin/bash > > set shellcmdflag=--login\ -c > > set shellxquote=\" > > > > When I try to use cygwin stuff with the "!" command or similar things > > from vim, it doesn't seem to know where it is. > > > > That is, if I open up a file on the desktop with gvim, and do > > > > :pwd > > > > It prints out the path of the desktop (thanks to autochdir I think). > > However, if I do > > > > :! pwd > > > > It prints out the location of my windows home directory. Is there > > anyway I could automatically pass to the shell the location it should > > start in? > > The problem is the "--login" option that you included in 'shellcmdflag'. > Every shell that you execute from vim is executed as a login shell, > which means it starts in your home directory. If you just > > set shellcmdflag=-c > > instead, it should work fine. > > Why did you include "--login"? > > Gary > > -- > Gary Johnson | Agilent Technologies > [EMAIL PROTECTED] | Wireless Division > | Spokane, Washington, USA >