This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
AW: Ultimative way to start Windows 95/98/NT/2000 programs from bash
- To: cygwin at sourceware dot cygnus dot com
- Subject: AW: Ultimative way to start Windows 95/98/NT/2000 programs from bash
- From: klaus dot berndl at sdm dot de
- Date: Sat, 11 Nov 2000 09:21:02 +0100
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@sourceware.cygnus.com