AW: Ultimative way to start Windows 95/98/NT/2000 programs from bash
klaus.berndl@sdm.de
klaus.berndl@sdm.de
Sat Nov 11 00:22:00 GMT 2000
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
More information about the Cygwin
mailing list