coteditor / cot

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

create new file without needing argument #3

Closed spacelatte closed 8 years ago

spacelatte commented 8 years ago

like behavior of nano, just opening (maybe temp) file if given argument does not exist.

btw opening multiple files at once would be very nice. example:

cot *Controller.m
1024jp commented 8 years ago

The open files with wildcard (*) is definitely the feature that cot command should implement. So, I've separated this issue to #4.

Regarding creating file without --new option, I'm still wondering which is the most standard behavior and what if user just miss typed the filename. I need to study other command-line editors a bit.

spacelatte commented 8 years ago

after seeing few (nano vim and atom etc) thry do seem like opening new file but they dont create actual file on the filesystem. maybe buffer/tempfile but no actual filename being saved unless you do cmd+s (save command)or save while quit prompt

1024jp commented 8 years ago

Thanks for the idea. However, CotEditor cannot adopt this strategy because of the Apple's Sandboxing. By a sandboxed application, a file must be created before opening it on the application. Otherwise user needs to save the file through the save panel.

spacelatte commented 8 years ago

okay got it, users maybe want pages/numbers style popup dialog but not important for me (cli guy here) as far as i concerned, original thing is implemented it will cover 90% of people's needs...

1024jp commented 7 years ago

Sorry for my late implementation. But wildcard will be able to be used from the next version.