X-Git-Url: http://id.pley.net/dotfiles.git/blobdiff_plain/eaa23ff9f75b7242773ccc3214fa3aea21730d8c..97c466170da3f0b5deef48bbbb706409239da41e:/.webkit_login?ds=sidebyside diff --git a/.webkit_login b/.webkit_login index 7d1e52f..ae4b19c 100644 --- a/.webkit_login +++ b/.webkit_login @@ -1,4 +1,32 @@ #!/bin/bash -export WEBKIT_DIR=~/Projects/WebKit.git -source ${WEBKIT_DIR}/webkitenv \ No newline at end of file +function switchto() { + export OLD_WEBKIT_DIR=$WEBKIT_DIR + export WEBKIT_DIR=~/Projects/WebKit.$1 + if [[ "$OLD_WEBKIT_DIR" == "" ]]; then + export PATH=$PATH:$WEBKIT_DIR/OpenSource/Tools:$WEBKIT_DIR/OpenSource/Tools/Scripts:$WEBKIT_DIR/Internal/Tools/Scripts + else + export PATH=$(echo $PATH | 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" + source $WEBKIT_DIR/OpenSource/Tools/Scripts/webkit-tools-completion.sh +} + +function _switchto_complete() { + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + opts=$( for dir in ~/Projects/WebKit.*; do echo ${dir##*.}; done ) + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 +} + +complete -F _switchto_complete switchto + +export EMAIL_ADDRESS=jer.noble@apple.com +export PS1='$( if [ $? = 0 ]; then echo \[\e[32m\]:-\)\ ; else echo \[\e[31m\]:-\(\ ;fi;)\[\e[0m\]$(__git_ps1 "(%s) ")\u@\h:$(short_pwd)> ' +source ~/bin/git-completion.bash + +switchto PuzzleBox \ No newline at end of file