delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/11/11/03:22:44

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: <C9A98ED35114D31197D000805FEA668E0176E59E@mucexch.muc.sdm.de>
From: klaus DOT berndl AT sdm DOT de
To: cygwin AT sourceware DOT cygnus DOT com
Subject: AW: Ultimative way to start Windows 95/98/NT/2000 programs from b
ash
Date: Sat, 11 Nov 2000 09:21:02 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

Ok, here comes a more ultimative way :-)

A slightly enhancement to my previous function:

# open any file in the correct program: a registered file-type (see assoc
# and ftype at W32) will be opened with the associated program. If this
# fails (maybe because the filetype is not registered) the file will be
# opened with the texteditor (here Emacs).
function open-file-with-w32 () {
    for i in $*; do
        cmd /c /q start /b `cygpath -w "$i"` 2>/dev/null || e `cygpath -w "$i"`
    done; }
alias o=open-file-with-w32

Only replace the 'e' in this function with your text-editor-command (for me
'e' starts Emacs).

Now you can open *all* filetypes simply with 'o' regardless if they are 
associated with a program in Windows NT.

Klaus

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019