8000 Update `cot` CLI behavior by matteocarnelos · Pull Request #1842 · coteditor/CotEditor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update cot CLI behavior #1842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matteocarnelos
Copy link

This PR updates the behavior of the cot Command Line Interface by aligning it to the one of other editors (e.g. Vim, Nano, Emacs, etc.).

I bumped the version to 6.0.0 as this PR introduces breaking changes to the interface (e.g. the --new flag is removed).
Fixes #1776.

The new behavior is highly inspired by Vim, meaning that:

  • cot opens a new untitled document
  • cot FILE1 FILE2 ..., for each path:
    • If the path is an existing file or directory, opens it in a new window
    • If the path is not an existing file, creates the file and any intermediate directory, and opens it in a new window

The rest is left unchanged.

Although I performed some tests, feel free to perform more.

@matteocarnelos matteocarnelos requested a review from 1024jp as a code owner April 19, 2025 17:44
@1024jp
Copy link
Member
1024jp commented Apr 21, 2025

Thank you for the PR.
However, the current implementation is intentional.
Please let me have time to consider it.

@1024jp 1024jp self-assigned this Apr 21, 2025
@1024jp 1024jp added the feature feature requests from users label Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature feature requests from users
Development

Successfully merging this pull request may close these issues.

cot should allow new file creation without --new/-n
2 participants
0