Skip to content
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

Command-line extension #18

Closed
Kamik423 opened this issue Feb 11, 2023 · 5 comments
Closed

Command-line extension #18

Kamik423 opened this issue Feb 11, 2023 · 5 comments

Comments

@Kamik423
Copy link

Kamik423 commented Feb 11, 2023

It would be nice to open MarkEdit from terminal using a quick command. I mad a custom

#!/bin/bash

open -a MarkEdit.app $1

in /usr/local/bin/markedit. Thus I can easily call it from terminal as markedit myfile.md.
At least for me this is a common use case so I would appreciate an install command line extension button in the settings somewhere that creates this file with 755 permissions.

@cyanzhong
Copy link
Contributor

Thanks for opening this issue, this is an interesting point.

I am not sure if it's feasible for a sandboxed app to create such a file, CotEditor (also sandboxed) requires users to manually link the script (it's written in Python): https://coteditor.com/cot will take a look anyway.

By the way, I noticed that you're the author of Hexer, I used a while ago and quite like your work!

@Kamik423
Copy link
Author

Thanks for the compliment! I hope to get to developing Hexer further soon.

i think there is some way to prompt the user to give access to a specific Folder. Then this is non intrusive to users who don’t use the extension and the ones who do know what they are doing

@1024jp
Copy link

1024jp commented Mar 18, 2023

CotEditor does not provide the Install button for the command-line tool because the reviewer of the MAS rejected it, even though it did not tear Sandboxing.
My strategy at that time was similar to yours; open the open panel to get the permission from the user to the directory to create a link.
Instead, the reviewer blamed the term "Install".
Apple seems to prohibit installing something additionally from apps.
Since it was several years ago, the rule could be changed. However, because of that, I guess it is quite difficult to provide a "Install" button for apps for the MAS.

@cyanzhong
Copy link
Contributor

@1024jp Thanks for sharing! Yeah, I can totally feel the pain of the App Store Review, I was rejected for similar reason for an iOS app, for mentioning "install" or "extension store", etc.

@cyanzhong
Copy link
Contributor

I've decided to close this as I realized it can be as simple as just a shell alias:

alias markedit="open -a MarkEdit"

For those who know what cli is, this won't take too much effort, see: https://github.com/MarkEdit-app/MarkEdit/wiki/Manual#command-line-tool-for-opening-files

Thanks again for the feedback and discussions here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants