This is the mail archive of the cygwin@sources.redhat.com 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]

Re: Cmd prompt functions missing


Jonas Jensen wrote:
> 
> I've found the Cygwin bash shell to be a perfect alternative to cmd.exe. However,
> there are some functions missing, or I can't find them:
> 
> start -- launch GUI applications. The argument can be a program, a web site, an
> ftp, a document... anything. I REALLY miss this command.
> 

---deleted stuff, should be able to handle same as the example below---

> I know I could write some of these commands myself, but if they're already hidden
> in there somewhere, I'd like to know. Also, how do you other people live without a
> command like 'start'?

I seldom need it.  But the following script shows how to get it (as well
as the other's).  This is bare bones, but serves to illustrate the idea.

===example script
#!/bin/bash

# Run the single argument via cmd's 'start', in a new window.
# First hack at this, I'm not supporting any of the 'standard' start
# options.

if [[ $# > 1 ]]
then
        echo currently only supports single argument. >&2
        exit 1
fi

# Fix the argument for consumption by Win/DOS
WinForm=$(cygpath -w $1)

# Run cmd.exe to get 'start' funciton, using the argument
cmd /c "start $WinForm"
===end script

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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