-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Advanced Usage
Tzu-ping Chung edited this page Aug 6, 2015
·
4 revisions
MacDown ships with a utility at MacDown.app/Contents/SharedSupport/bin/macdown
. You can use this to launch MacDown straight from the Terminal. I use the following Bash function to access it:
macdown() {
"$(mdfind kMDItemCFBundleIdentifier=com.uranusjr.macdown | head -n1)/Contents/SharedSupport/bin/macdown" $@
}
Note: You need to first launch MacDown at least once for this command to work. This registers
com.uranusjr.macdown
to OS X so thatmdfind
recognises MacDown by that identifier.
Open files with MacDown:
$ macdown file.md another_file.md yet_another_file.md
If you’re an experienced CLI user, you might know the open -a MacDown file.md
trick. The advantage of this utility over open -a MacDown
is that it can also be used to create files. So
$ macdown foo.md
will open foo.md
if it exists, or create a new document with that name if it does not.