Coteditor: Future request: command cot $file, touch the file if it does not exist

Created on 11 Aug 2017  ·  4Comments  ·  Source: coteditor/CotEditor

$ cot readme.md
usage: cot [-h] [-v] [-w] [-g] [-n] [-l LINE] [-c COLUMN] [FILE [FILE ...]]
cot: error: argument FILE: [Errno 2] No such file or directory:

$ touch readme.md
$ cot readme.md

と毎回やってしまうので、自動で作って欲しいと思います。

support

Most helpful comment

オプションの「-n」もしくは「--new」で新たにfileが作成されますよ。
~
$ cot -n readme.md
~

もしくは
~
$ cot --new readme.md
~

All 4 comments

オプションの「-n」もしくは「--new」で新たにfileが作成されますよ。
~
$ cot -n readme.md
~

もしくは
~
$ cot --new readme.md
~

@tadaken3 見落としていました。ありがとうございます…!

本件解決ということでクローズします。

補足:
新規ファイル作成のためのファイル名か他の操作の typo かの区別が微妙なので、
敢えて --new オプションがないときは自動でファイル作成はしないようにしています。

Was this page helpful?
0 / 5 - 0 ratings