PATH="$HOME/usr/local/bin:$HOME/bin:$HOME/usr/bin:$PATH" export PATH export LC_ALL=en_US.UTF-8 if [ -z "$BASEPATH" ] then export BASEPATH="$PATH" fi alias reset-path="export PATH=\"$BASEPATH\"" detach() { for i; do [ -L "$i" ] && cp --remove-destination `readlink "$i"` "$i"; done } link-tools() { PATH=$HOME/tools/bin:$HOME/tools/usr/bin:$PATH LD_LIBRARY_PATH=$HOME/tools/lib:$HOME/tools/usr/lib:$LD_LIBRARY_PATH export PATH export LD_LIBRARY_PATH } unlink-tools() { PATH=$(echo $PATH | perl -pne "s/(?<=:)$HOME/tools.*://g") LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | perl -pne "s/(?<=:)$HOME/tools.*://g") export PATH export LD_LIBRARY_PATH } alias list="ls -lFh --color" alias listall="list -A" alias git-graph="git log --graph --pretty=oneline --abbrev-commit --decorate --all" alias disk-usage="ls -A | xargs du -shc | sort -h" alias reload="source ~/.profile-user" refreshterm() { clear uname -a cat /etc/motd echo "" pwd list } export EDITOR=/home/user/wreed/bin/vim _mkcd_fun() { if [ ! -d "$2" ]; then if [ -e "$2" ]; then echo "mkcd: file exists and is not a directory" exit else $1 "$2" fi fi cd "$2" } alias mkcd="_mkcd_fun mkdir" mkdirs() { mkdir -p "$1" } alias mkcds="_mkcd_fun mkdirs_fun" alias diffr="diff --ignore-blank-lines --minimal --side-by-side --report-identical-files --suppress-common-lines" _recall_fun() { if [ -z "$1" ]; then echo "recall: usage: recall string"; return 1; fi history | cut -c 8- | grep --extended-regexp "$1" | \ grep --invert-match --extended-regexp "^(history|recall|redo)" | sort | uniq } redo() { IFS=$'\n' hist=($(_recall_fun $1)) for ((i=0; i<${#hist[@]}; i++)); do echo "[$i] ${hist[$i]}" done printf "Index: " read idx if [[ $idx =~ ^[0-9]+$ ]]; then eval "${hist[$idx]}" fi unset IFS } recall(){ _recall_fun $1 | sed 's/^/ /' } alias coms="~sjaffe/tools/comstore/commands.sh" source ${HOME}/.profile-p4