[IDE & Editor] Marked 2: Command Line からファイルを開く

公式に載っているファイルの開き方には Command Line から開く方法がないので調査。

[markdown]
> * [Opening Files](http://marked2app.com/help/Opening_Files.html)

以前のバージョンにはユーティリティが存在したよう。

> * [Install Command Line Utility is not shown in the Marked Menu / Problems / Discussion Area – Marked Support](http://support.markedapp.com/discussions/problems/547-install-command-line-utility-is-not-shown-in-the-marked-menu)
> * [Running Marked 2 from the Command Line](http://jblevins.org/log/marked-2-command)

.zshrc などに下記の function を追加。

“`bash:.zshenv
function marked() {
if [ $1 ]; then
open -a “Marked 2” $1;
else
open -a “Marked 2”;
fi
}
“`

下記でファイルを開く。

“`prettyprinted
% marked README.md
“`

エディタと同時に開く。

“`prettyprinted
% marked README.md && subl $_
“`
[/markdown]