X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 	tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <183c528b0905151551q1fab1270t2849af83b23b64b@mail.gmail.com>
References: <gukn6n$afs$1@ger.gmane.org> 	 <183c528b0905151551q1fab1270t2849af83b23b64b@mail.gmail.com>
Date: Sat, 16 May 2009 11:25:11 +0400
Message-ID: <e2480c70905160025i6bd3ef63l4581d532989efa9e@mail.gmail.com>
Subject: Re: Calling Cygwin to start a shellscript
From: Alexey Borzenkov <snaury@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Sat, May 16, 2009 at 2:51 AM, Brian Mathis <brian.mathis@gmail.com> wrot=
e:
> What I have done is associate files with a .sh extension to run the
> bash.exe file. =C2=A0Works 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/

