b88d68279e3974b0e5b177c9cd4b17f4ada89eba

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #3060 from chrisfsmith/feature/marked

Adding Marked 2 plugin (OS X only)

Diff

 1diff --git a/plugins/marked2/README.md b/plugins/marked2/README.md
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..101343abbae62c7bf0975c251119b1eb847bee6e
 4--- /dev/null
 5+++ b/plugins/marked2/README.md
 6@@ -0,0 +1,13 @@
 7+## marked2
 8+
 9+Plugin for Marked 2, a previewer for Markdown files on Mac OS X 
10+
11+### Requirements
12+
13+ * [Marked 2](http://marked2app.com)
14+
15+### Usage
16+
17+ * If `marked` is called without an argument, open Marked
18+
19+ * If `marked` is passed a file, open it in Marked
20diff --git a/plugins/marked2/marked2.plugin.zsh b/plugins/marked2/marked2.plugin.zsh
21new file mode 100644
22index 0000000000000000000000000000000000000000..56863ade57dd34a7fb3158d369e8b36860349ea5
23--- /dev/null
24+++ b/plugins/marked2/marked2.plugin.zsh
25@@ -0,0 +1,12 @@
26+#
27+# If marked is called without an argument, open Marked
28+# If marked is passed a file, open it in Marked
29+#
30+function marked() {
31+    if [ "$1" ]
32+    then
33+        open -a "marked 2.app" "$1"
34+    else
35+        open -a "marked 2.app"
36+    fi
37+}