dvcrn / markright

➡ Electron powered markdown editor with live preview
GNU General Public License v3.0
914 stars 55 forks source link

Launch from command line support #22

Closed ignlg closed 8 years ago

ignlg commented 8 years ago

To be able to launch it from command line is a step forward for all devs out there.

So we could use it like:

$ alias markright="~/Applications/MarkRight.app/Contents/SharedSupport/bin/markright"
$ markright README.md

It's beautiful, isn't it? (♥‿♥)

derhuerst commented 8 years ago

:+1:

dvcrn commented 8 years ago

I think this should be fairly simple once we have 'open with' support https://github.com/dvcrn/markright/issues/6. Seems to be straight forward - https://github.com/atom/electron/blob/master/docs/api/app.md#event-open-file. I'll see if I can get something running by the end of the day

dvcrn commented 8 years ago

All right, once #6 is merged we can do something like

alias markright="open -a /Applications/MarkRight.app"
markright FOO.md
dvcrn commented 8 years ago

Looks like this is not completely done yet. When the app is closed, the command above will open the app but not load the document in. Only when the app is already running it will work.

dvcrn commented 8 years ago

Resolved with the above command in 0.1.10