X-Git-Url: http://id.pley.net/dotfiles.git/blobdiff_plain/10f7a98c1e9de39a3b8f3ab18cf63d2c3a62b082..f4e318ead195f190703dc8b02ef45f8d7d0f4d2d:/zsh_webkit_login?ds=sidebyside diff --git a/zsh_webkit_login b/zsh_webkit_login index 08bb408..16325b6 100644 --- a/zsh_webkit_login +++ b/zsh_webkit_login @@ -1,21 +1,17 @@ -#/bin/zsh +#!/bin/zsh switchto() { export OLD_WEBKIT_DIR=$WEBKIT_DIR export WEBKIT_DIR=~/Projects/WebKit.$1 - export WEBKIT_OUTPUTDIR=$WEBKIT_DIR/OpenSource/WebKitBuild - export PERP_BUILD_PATH=$WEBKIT_OUTPUTDIR + export PERP_BUILD_PATH=$WEBKIT_DIR/OpenSource/WebKitBuild if [[ "$OLD_WEBKIT_DIR" == "" ]]; then 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 + export CDPATH=$CDPATH:$WEBKIT_DIR/:$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= - - alias opensource="cd $WEBKIT_DIR/OpenSource" - alias internal="cd $WEBKIT_DIR/Internal" } _webkit_dirs() { compadd $( for dir in ~/Projects/WebKit.*; do echo ${dir##*.}; done ) } @@ -23,10 +19,12 @@ _switchto() { _arguments '1:dir:_webkit_dirs' } compdef _switchto switchto -if [[ $( has subl ) == 'yes' ]]; then +if [[ $( has sedit ) == 'yes' ]]; then + export GUI_EDITOR="sedit -w" +elif [[ $( has subl ) == 'yes' ]]; then export GUI_EDITOR="subl -w" elif [[ $( has bbedit ) == 'yes' ]]; then - export GUI_EDITOR="bbedit -w" + export GUI_EDITOR="bbedit" elif [[ $( has mate_wait ) == 'yes' ]]; then export GUI_EDITOR="mate_wait" else