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]

Re: Calling Cygwin to start a shellscript


On Sat, May 16, 2009 at 2:51 AM, Brian Mathis <brian.mathis@gmail.com> wrote:
> What I have done is associate files with a .sh extension to run the
> bash.exe file. ÂWorks for me, but I'm not sure if it pulls in all the
> environment variables - but I don't need them.

If you ever need those environment variables, take a look at my
http://git.kitsu.ru/mine/shell-wrapper.git (though there's no
documentation at the moment, I hope people would understand it on
their own). In short, you create C:\cygwin\bin-public directory, where
tiny executable proxies are generated for any command you like (like
bash, git, ruby, etc.) and a configuration file that describes
environment changes. You can add bin-public to your path, it's almost
as fast as executing the command directly from bin (my primary reason
for creating shell-wrapper was extremely long time it took to bash
--login), and there are no commands in your path that you don't need
(or that might clash with something else).

I also usually create a cygwin.exe wrapper (it's all in the batch
file), which allows me to type "cygwin command [parameters]" directly
from FAR Manager/cmd prompt...

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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