From: Andy <AndyMHancock@gmail.com>
To: cygwin@cygwin.com
Subject: Shelling out to cygwin bash from Windows vim Options
Date: Sun, 02 Sep 2012 00:02:00 -0000 [thread overview]
Message-ID: <loom.20120902T020050-387@post.gmane.org> (raw)
This problem dogged me for many years, and I finally hunkered down to
chase it down.
Here is the solution that I found works for me:
"set shell=c:\cygwin\bin\bash.exe\ -i
"Won't always find ~/.bashrc cuz depending on how vim is launched,
"~ doesn't always resolve to c:/cygwin/home/$USERNAME
"let &shell='c:\cygwin\bin\bash.exe\ --rcfile c:\cygwin\home\' .
" \ $USERNAME . '\.bashrc'
"Backslashes are hated by bash. Also needs -i to ensure bash is
"interactive so that .bashrc is sourced
let &shell='c:\cygwin\bin\bash.exe --rcfile c:/cygwin/home/' .
\ $USERNAME . '/.bashrc -i'
" Depending on how vim is launched, c:/cygwin/home/$USERNAME
" will sometimes be equivalent to ~. If so, then it will be
" replaced by ~ in &shell.
Thanks to all those who helped on the unix, bash, cygwin, and vim
forums.
--
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
next reply other threads:[~2012-09-02 0:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-02 0:02 Andy [this message]
2012-09-02 0:05 Andy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20120902T020050-387@post.gmane.org \
--to=andymhancock@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).