Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open a file from Cygwin

Tags:

shell

cygwin

Is there an equivalent to OSX open command in cygwin. open opens a file with the default application for that type.

I want to do something like

$ magic-command file.xls #excel opens as if file.xls would have been double-clicked  $ magic-command file.txt #notepad opens as if file.txt would have been double-clicked 

You get the idea?

Basically something like a "cygwin-double-click" command.

like image 522
Mo. Avatar asked Feb 23 '09 13:02

Mo.


1 Answers

You can also use the cygwin utility:

cygstart <your file> 

To make things OSX-like add the following to your bashrc

alias open='cygstart' 

Don't forget to check out the man page for cygstart.

like image 173
erichui Avatar answered Sep 22 '22 04:09

erichui