从Cygwin打开一个文件 [英] Open a file from Cygwin

查看:282
本文介绍了从Cygwin打开一个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在cygwin中有相当于OSX open 的命令。 open 打开一个包含该类型默认应用程序的文件。





  $ magic-command file.xls 
#excel打开,如同file.xls已被双击

$ magic-command file.txt
#notepad打开,如同file.txt已被双击

你会得到这个想法吗?



基本上类似于cygwin-double-click命令。

  cygstart<您的文件> 

要使事情类似OSX,请将以下内容添加到bashrc

 别名open ='cygstart'

不要忘了查看cygstart的手册页。


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.

解决方案

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.

这篇关于从Cygwin打开一个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆