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
Message-Id: <5.1.0.14.2.20010917160029.026fd7c0@pop3.cris.com>
X-Sender: rrschulz@pop3.cris.com
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Mon, 17 Sep 2001 16:02:45 -0700
To: anoop@alumni.duke.edu, Robert Collins <robert.collins@itdomain.com.au>,
        anoop@alumni.duke.edu
From: Randall R Schulz <rrschulz@cris.com>
Subject: Re: using aliases for cygwin commands on win2k
Cc: cygwin@cygwin.com
In-Reply-To: <20010917225406.95591.qmail@web11106.mail.yahoo.com>
References: <1000766517.1643.11.camel@lifelesswks>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed

Anoop,

Here's a kind of a solution to that problem:

open ()
{
     for doc in "$@";
     do
         if [ ! -f "$doc" ]; then
             echo "open: \"$doc\" does not exist." 1>&2;
         else
             docFileWin="$(cygpath -w "$doc")";
             cmd /q /c start /b "$docFileWin";
         fi;
     done
}


If you were rather more ambitious, you could even write your own command 
processing loop to make this transparent.

Randall Schulz
Mountain View, CA USA


At 15:54 2001-09-17, Anoop Ghanwani wrote:
>--- Robert Collins <robert.collins@itdomain.com.au> wrote:
> > On Tue, 2001-09-18 at 08:37, Anoop Ghanwani wrote:
> > > I wanted to find out how to use aliases for cygwin commands
> > > on win2k.  The cygwin commands are located at c:\cygwin\bin.
> > > I don't run bash, but I still use commands such as ls, grep, rm, mv.
> > > I would like to create aliases for these commands such as
> > > alias ls 'ls -lF' and so on.  How do I do something like this?
> >
> > Run bash/tcsh/ksh. Do not run cmd.exe.
>
>Thanks for the response.
>
>If I do that, I lose the ability to start applications
>automatically by simply typing the file name.  For example,
>if I have a file try.doc, and I type try.doc at the Windows
>2000 command prompt, it brings up Word with that document.
>
>-Anoop


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

