summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2014-08-31 11:25:29 -0700
committerRobby Russell <robby@planetargon.com>2014-08-31 11:25:29 -0700
commit3577fba6122e602e6a3fb0a5682dc4b8ef05e186 (patch)
treeca5dc71d0447a2805addb2e0a3f8875597437566 /plugins
parentc207c839689b49db96ebd60eecdc8026cbb107e5 (diff)
parenta8dad6fa87867ff2629a55e26f78175635a0ad06 (diff)
downloadzsh-3577fba6122e602e6a3fb0a5682dc4b8ef05e186.tar.gz
zsh-3577fba6122e602e6a3fb0a5682dc4b8ef05e186.tar.bz2
zsh-3577fba6122e602e6a3fb0a5682dc4b8ef05e186.zip
Merge pull request #3058 from chrisfsmith/feature/textastic
Adding Textastic plugin (OS X only)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/textastic/README.md15
-rw-r--r--plugins/textastic/textastic.plugin.zsh17
2 files changed, 32 insertions, 0 deletions
diff --git a/plugins/textastic/README.md b/plugins/textastic/README.md
new file mode 100644
index 000000000..369c2c137
--- /dev/null
+++ b/plugins/textastic/README.md
@@ -0,0 +1,15 @@
+## textastic
+
+Plugin for Textastic, a text and code editor for Mac OS X
+
+### Requirements
+
+ * [Textastic](http://www.textasticapp.com/mac.html)
+
+### Usage
+
+ * If `tt` command is called without an argument, launch Textastic
+
+ * If `tt` is passed a directory, cd to it and open it in Textastic
+
+ * If `tt` is passed a file, open it in Textastic
diff --git a/plugins/textastic/textastic.plugin.zsh b/plugins/textastic/textastic.plugin.zsh
new file mode 100644
index 000000000..f5901eae2
--- /dev/null
+++ b/plugins/textastic/textastic.plugin.zsh
@@ -0,0 +1,17 @@
+#
+# If the tt command is called without an argument, launch Textastic
+# If tt is passed a directory, cd to it and open it in Textastic
+# If tt is passed a file, open it in Textastic
+#
+function tt() {
+ if [[ -z "$1" ]]
+ then
+ open -a "textastic.app"
+ else
+ open -a "textastic.app" "$1"
+ if [[ -d "$1" ]]
+ then
+ cd "$1"
+ fi
+ fi
+}