]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/textastic/textastic.plugin.zsh
f5901eae2fcfcaa6fdb460b2a9e6c11c29f2f538
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / textastic / textastic.plugin.zsh
1 #
2 # If the tt command is called without an argument, launch Textastic
3 # If tt is passed a directory, cd to it and open it in Textastic
4 # If tt is passed a file, open it in Textastic
5 #
6 function tt() {
7     if [[ -z "$1" ]]
8     then
9         open -a "textastic.app"
10     else
11         open -a "textastic.app" "$1"
12         if [[ -d "$1" ]]
13         then
14             cd "$1"
15         fi
16     fi
17 }