From 325c18736e82d0688f7437cefff23910ebd7cedd Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 26 Aug 2014 08:37:04 -0500 Subject: [PATCH 1/3] Adding Textastic plugin --- plugins/textastic/textastic.plugin.zsh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 plugins/textastic/textastic.plugin.zsh diff --git a/plugins/textastic/textastic.plugin.zsh b/plugins/textastic/textastic.plugin.zsh new file mode 100644 index 000000000..c34162139 --- /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 +} From 362f2a56d276aebfb8da4e3244994f69899bbdbd Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 27 Aug 2014 08:27:31 -0500 Subject: [PATCH 2/3] Adding quotes around $1 --- plugins/textastic/textastic.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/textastic/textastic.plugin.zsh b/plugins/textastic/textastic.plugin.zsh index c34162139..f5901eae2 100644 --- a/plugins/textastic/textastic.plugin.zsh +++ b/plugins/textastic/textastic.plugin.zsh @@ -4,14 +4,14 @@ # If tt is passed a file, open it in Textastic # function tt() { - if [[ -z $1 ]] + if [[ -z "$1" ]] then open -a "textastic.app" else - open -a "textastic.app" $1 - if [[ -d $1 ]] + open -a "textastic.app" "$1" + if [[ -d "$1" ]] then - cd $1 + cd "$1" fi fi } From a8dad6fa87867ff2629a55e26f78175635a0ad06 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sun, 31 Aug 2014 12:55:46 -0500 Subject: [PATCH 3/3] Adding README.md --- plugins/textastic/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/textastic/README.md 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