diff options
author | Robby Russell <robby@planetargon.com> | 2014-08-31 11:32:21 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2014-08-31 11:32:21 -0700 |
commit | 69088270357ab203cfafa23a87ee7a177a6bbd2f (patch) | |
tree | ad47c9df047d3eb3b51306b19efd00a33b9c13a4 /plugins/textastic/textastic.plugin.zsh | |
parent | 671bd0cf4f0face60883a2b476e75e6364d0154e (diff) | |
parent | c22658e15d9d4934ddf411c0cb580f6dd3e901c8 (diff) | |
download | zsh-69088270357ab203cfafa23a87ee7a177a6bbd2f.tar.gz zsh-69088270357ab203cfafa23a87ee7a177a6bbd2f.tar.bz2 zsh-69088270357ab203cfafa23a87ee7a177a6bbd2f.zip |
Merge branch 'master' of github.com:robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/textastic/textastic.plugin.zsh')
-rw-r--r-- | plugins/textastic/textastic.plugin.zsh | 17 |
1 files changed, 17 insertions, 0 deletions
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 +} |