X-Git-Url: http://id.pley.net/dotfiles.git/blobdiff_plain/569e076d6ef56543bf02b6beabb363d02b143525..3b49c605d91d7fe18479b089b8ee184cb411704b:/zsh_webkit_login diff --git a/zsh_webkit_login b/zsh_webkit_login index 6dc4657..5e949cb 100644 --- a/zsh_webkit_login +++ b/zsh_webkit_login @@ -5,9 +5,11 @@ switchto() { export WEBKIT_DIR=~/Projects/WebKit.$1 export WEBKIT_OUTPUTDIR=$WEBKIT_DIR/OpenSource/WebKitBuild if [[ "$OLD_WEBKIT_DIR" == "" ]]; then - export PATH=$PATH:$WEBKIT_DIR/OpenSource/Tools:$WEBKIT_DIR/OpenSource/Tools/Scripts:$WEBKIT_DIR/Internal/Tools/Scripts + export PATH=$PATH:$WEBKIT_DIR/Internal/Tools/Scripts:$WEBKIT_DIR/OpenSource/Tools:$WEBKIT_DIR/OpenSource/Tools/Scripts + export CDPATH=$CDPATH:$WEBKIT_DIR/OpenSource:$WEBKIT_DIR/OpenSource/Source:$WEBKIT_DIR/Internal else export PATH=$(echo $PATH | sed -e "s;$OLD_WEBKIT_DIR;$WEBKIT_DIR;g") + export CDPATH=$(echo $CDPATH | sed -e "s;$OLD_WEBKIT_DIR;$WEBKIT_DIR;g") fi export OLD_WEBKIT_DIR= @@ -20,4 +22,24 @@ _switchto() { _arguments '1:dir:_webkit_dirs' } compdef _switchto switchto +if [[ $( has subl ) == 'yes' ]]; then + export GUI_EDITOR="subl -w" +elif [[ $( has bbedit ) == 'yes' ]]; then + export GUI_EDITOR="bbedit -w" +elif [[ $( has mate_wait ) == 'yes' ]]; then + export GUI_EDITOR="mate_wait" +else + export GUI_EDITOR="vim" +fi + +if [[ -z "$SSH_TTY" ]]; then + export EDITOR="$GUI_EDITOR" + export SVN_LOG_EDITOR="$GUI_EDITOR" + export GIT_SEQUENCE_EDITOR="$GUI_EDITOR" +else + export EDITOR=vim + export SVN_LOG_EDITOR=vim + export GIT_SEQUENCE_EDITOR=vim +fi + switchto git