delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <C2D7D58DBFE9D111B0480060086E96350288AA78@mail.gft.de> |
From: | "Schaible, Joerg" <Joerg DOT Schaible AT gft DOT com> |
To: | cygwin AT sourceware DOT cygnus DOT com |
Subject: | RE: Ultimative way to start Windows 95/98/NT/2000 programs from b |
ash | |
Date: | Mon, 13 Nov 2000 13:46:01 +0100 |
MIME-Version: | 1.0 |
X-Mailer: | Internet Mail Service (5.5.2650.21) |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id HAA20885 |
Hi Klaus, My be you should remove now 95 and 98 from the subject <g>. What about other executables or script files identified by PATHEXT ? Greetings, Jörg > -----Original Message----- > From: klaus DOT berndl AT sdm DOT de [mailto:klaus DOT berndl AT sdm DOT de] > Sent: Monday, November 13, 2000 1:20 PM > To: cygwin AT sourceware DOT cygnus DOT com > Subject: AW: Ultimative way to start Windows 95/98/NT/2000 > programs from > b ash > > > OK, here comes my last version of this way, this avoids all > the problems > you have mentioned: > > function open-file-with-w32 () { > erg="" > for i in $*; do > if [ -f "$i" ]; then > # get the extension only > erg=`echo $i | sed -e 's|.*\.||g;'` > # check if we try to open a bat or cmd file > if [ "$erg" != "bat" ] && > [ "$erg" != "BAT" ] && > [ "$erg" != "cmd" ] && > [ "$erg" != "CMD" ]; then > # check if this extension is associated with > a w32-program > erg=`cmd /c assoc ".$erg" 2>/dev/null` > if [ "$erg" != "" ]; then > # an associtiation exists therefore this call > # should theoretically not produce an error. > cmd /c start /b `cygpath -w "$i"` 2>/dev/null > else > # we must start the file with a text editor > emacs `cygpath -w "$i"` > fi > else > emacs `cygpath -w "$i"` > fi > fi > done > unset erg; } > alias o=open-file-with-w32 > > Now you can open all filetypes with their associated program and if no > association exists it will be opened with the text editor (here emacs) > > Hope this helps, > Klaus -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |