cite about-plugin about-plugin 'osx-specific functions' # OS X: Open new tabs in same directory if [ $(uname) = "Darwin" ]; then if type update_terminal_cwd > /dev/null 2>&1 ; then if ! [[ $PROMPT_COMMAND =~ (^|;)update_terminal_cwd($|;) ]] ; then PROMPT_COMMAND="${PROMPT_COMMAND%;};update_terminal_cwd" declared="$(declare -p PROMPT_COMMAND)" [[ "$declared" =~ \ -[aAilrtu]*x[aAilrtu]*\ ]] 2>/dev/null [[ $? -eq 0 ]] && export PROMPT_COMMAND fi fi fi function tab() { about 'opens a new terminal tab' group 'osx' osascript 2>/dev/null <