coteditor / cot

Command-line helper tool for CotEditor
https://coteditor.com/cot
Apache License 2.0
55 stars 11 forks source link

Allow creating new files without the -n flag #14

Closed foreignfilm closed 9 months ago

foreignfilm commented 2 years ago

Suggesting to make the -n flag optional, to closer match the behaviour of the code CLI command of VS Code. This allows creating new files with fewer keystrokes.

Additionally, tweaked the code so that multiple new files could be created at once:

$ ls
$ cot new1.md new2.md
$ ls
new1.md new2.md

The new CLI interface allows mixing existing and new file paths. Existing files won't be overridden, unless the -n flag is passed.