This is partly due to the use of   --login  , which causes it to act
as if it's a fresh login shell, so of course, it goes to your home
directory.  Try it with just   -c  .

Without setting that, zsh and bash seem to honor $PWD, probably, which
I suspect is exported by Vim..  I'm having trouble getting my rc file
to print it out when started from Vim.


On 5/23/06, 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?

Reply via email to