Parent directory

textastic.plugin.zsh

386 bytes
 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#
 6function 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}