Mac Markdown Editor
Opened this issue · 3 comments
https://apps.apple.com/us/app/markdown-editor/id1458220908?mt=12
"productivity" indeed ...
Tried:
open -a "Mardown Editor"
Got:
Unable to find application named 'Mardown Editor'
Followed: How to Run ANY APP Using Terminal on MacOS: https://youtu.be/BYKpot_NjH8
But what I want is a keyboard shortcut or alias I can run to open the app with a specific file ...
https://wpbeaches.com/make-an-alias-in-bash-or-zsh-shell-in-macos-with-terminal 👀
vi .zshrc
Add the following line:
alias m='/Applications/Markdown\ Editor.app/Contents/MacOS/Markdown\ Editor'
Save the file: Esc, wq
, Enter
Run:
source ~/.zshrc
Then:
cd ~/code/book
m
That worked to open a blank editor:
But what I want is to open a document in the editor ...
e.g:
m README.md
Sadly, I get the following error:
Error Domain=NSCocoaErrorDomain Code=260 "The file “README.md” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/n/Library/Containers/info.iwaki.MarkdownEditor/Data/README.md, NSUnderlyingError=0x6000035dc3f0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
https://apple.stackexchange.com/questions/212583/how-to-open-files-via-terminal 👀
Let's try:
vi .zshrc
Add the following line:
alias m='open -a "/Applications/Markdown\ Editor.app/Contents/MacOS/Markdown\ Editor" README.md'
Save the file: Esc, wq
, Enter
Run:
source ~/.zshrc
Sadly, that hunch didn't work either ...
The application /Applications/Markdown\ Editor.app/Contents/MacOS/Markdown\ Editor cannot be opened for an unexpected reason, error=Error Domain=NSCocoaErrorDomain Code=260 "The file “Markdown\ Editor” couldn’t be opened because there is no such file." UserInfo={NSURL=file:///Applications/Markdown%5C%20Editor.app/Contents/MacOS/Markdown%5C%20Editor, NSFilePath=/Applications/Markdown\ Editor.app/Contents/MacOS/Markdown\ Editor, NSUnderlyingError=0x60000209c270 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}