Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
From: "Pabs" <pabs3@crosswinds.net>
Reply-To: pabs3@crosswinds.net
To: "Jason B. Alonso" <jalonso@MIT.EDU>
Cc: cygwin@cygwin.com
Date: Wed, 04 Apr 2001 11:27:13 +0800
Subject: RE: cygwin.bat replacement ...
Message-id: <3aca9406.ce1f.0@crosswinds.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

>Might I suggest a somewhat simpler solution?
Sure

---------------------------------------------------------------
...I noticed that the normal Cygwin.bat is minimalist.  It sets
the CYGWIN environment variable and runs bash, nothing else.  Not even a path
setting.  Everything else is handled in /etc/profile.
---------------------------------------------------------------
At home on win95 & win98 here at uni there is no CYGWIN env var.
What is it for?

>Here's my solution (replace C:\Cygwin as necessary)...
>Cyg2.bat
>========
>@echo off
>cd "%1"
>SET CYGWIN=tty ntsec
>SET CYG2=HOLD
>C:\Cygwin\bin\bash --login -i
>=========
Elegant, but
you are missing "cd back to the curent directory for people who called cygwin.bat
from a command.com (or cmd.exe) prompt" and it doesn't seem to work when %1
is nothing even if I replace
cd "%1" with if NOT %1/ == / cd "%1"

The main reason I did it only using a batch file (& not /etc/profile) was that
I had problems with special characters in the pathnames like single quotes (')
and with "" quoting.
Also I wanted to be able to have only one file for executing cygwin.
I still think it would be better implemented as an exe since it would eliminate
such interpretation problems.

>I might have added it myself, but I don't remember...
Nope setup.exe installs that.

Seeya, Pabs

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

