#!/bin/sh [ `uname -s` != "Darwin" ] && return function tab () { local cmd="" local cdto="$PWD" local args="$@" if [ -d "$1" ]; then cdto=`cd "$1"; pwd` args="${@:2}" fi if [ -n "$args" ]; then cmd="; $args" fi iterm_exists=`osascript -e "id of application \"iterm2\""` if [ ! -z iterm_exists ]; then osascript &>/dev/null </dev/null <