Mac OS 用指定程序打开文件 stay foolish, stay hungry
文/甄谨言 Mac 下我一般都是用 bash 创建 markdown 文件,然后再用 Mou 程序编辑的,用 Mou 程序的好处在于可以实时看到编辑后的文本效果。于是就想再 bash 中直接用 Mou 打开刚刚建立的文件,查 help 文档信息
open: unrecognized option '--help'
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments]
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL.
Options:
-a Opens with the specified
看到其中的open [-a <application>] [filenames] [--args arguments]
,及命令行说明Help: Open opens files from a shell.
,所以如果我再 bash 中要用 Mou 打开.md
的文件就应该在 shell 中输入
open -a mou filename.md