This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Debug the skipping of .bashrc when bang out from vim PC version


It is often more covenient to use the Windows install of gvim than to fire up
Cygwin's X-windows to run the Cygwin version of gvim.  In order to be able to
bang out to run bash commands, I have this in my vimrc:

   shell=c:\cygwin\bin\bash.exe\ -i

This allows me to do things like

   !!ls

or

   :w !cat
   
However, this only works when I launch the Windows version of gvim from my
Administrator account.  When I try those commands from a non-administrator
account, I get:

   shell return 127 bash: ls: command not found

or

   shell return 127 bash: cat: command not found

It actually took a while to recognize this pattern with the administrator
account.  I thought it would be simple to track down the cause after finding
this.  I thought I could simply set 

   shell=c:\cygwin\bin\bash.exe\ -i\ -v

Then I could do echo the results of the shell-outs to register a and paste them
somewhere:

   :redir @a !!ls :w !cat :redir END

I confirmed that

   c:\cygwin\bin\bash.exe -i -v

actually echos every gruesome detail by issuing it from the command line. 
However, setting vim's "shell" option to include the -v option *doesn't* seem to
echo all the gruesome details regardless of whether I use an administrator or
non-administrator account.

1. Can anyone suggest a cause and/or solution to the inability of the
non-administrator to shell out?

2. What about why the -v option doesn't seem to work when included in vim's
shell option?

3. Can anyone suggest another way to troubleshoot the inability of the
non-administrator account to shell out?

Thanks!


--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]