j="/usr/local/bin /home/dunc/command_line_tools/bin /home/dunc/bin" for i in $j do echo :$PATH:|grep -q :$i: || { [ -d $i ] && PATH=$i:$PATH; } done for i in /usr/local/sbin /usr/sbin /sbin do echo :$PATH:|grep -q :$i: || { [ -d $i ] && PATH=$PATH:$i; } done HISTCONTROL=erasedups HISTIGNORE="?:??:pd*:ppd*:LLT:LLCT:GL*::]] *:up *:tstclean*:history*:\ HT *:Hd *:exit:exit_sh:svdirs" FIGNORE=".o:.bu:.lo" [ $UID -ne 0 ] && FIGNORE=${FIGNORE}:.d [ -n "$PS1" ] && { PS1='\h@\t\w\$ ' IGNOREEOF=5 [ "${TERM:0:5}" = xterm ] && { # Cater for change to parameter / tilde substitution at 4.3 [ ${BASH_VERSION:0:1} -le 4 -a ${BASH_VERSION:2:1} -le 2 ] && PS1='\[\e]0;${LOGNAME}@${HOSTNAME}:${PWD/#$HOME/~}\a\]\t\$ ' || PS1='\[\e]0;${LOGNAME}@${HOSTNAME}:${PWD/#$HOME/"~"}\a\]\t\$ ' } } pd() { [ -n "$1" ] && { # Drop through if arg is not a number [ "$1" -gt 0 ] 2>/dev/null && { pushd +"$1" >/dev/null; return; } pushd "$1" >/dev/null return } pushd >/dev/null } pdd() { [ -n "$1" ]||{ echo "pdd: missing arg" >&2;return 1; } pd "$1" pd pd 1 } svdirs() { echo $HISTFILE | grep -E -q histfiles && dirs -v > $HISTFILE.dirs } ppd(){ popd $1 >/dev/null; } unalias -a [ -r ~/functions ] && . ~/functions echo $PATH|grep ":[.]:" >/dev/null && PATH=`echo $PATH|sed 's/:[.]//'` export INFOPATH=/usr/info export EXINIT='se showmode number ai' export PAGE=A4 export EDITOR=q export VISUAL='xterm -geometry 88x98+0+0 -rw -ls -sl 2000 -sb -font 7x14 -e q' export PAGER=k export GIT_PAGER="k -R" export C=' *.c *.h Makefile' export SHELL=/bin/bash export LESS="-X -j 1 \ -Ps?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x..%t?a:More." export Q_HELP_CMD=k export -n HISTFILE [ -n "$SHLVL" ] || SHLVL=1 [ $SHLVL -gt 1 ] && alias s=exit alias rdy='echo $SHLVL' alias ]='dirs -v' alias ]]="]|grep -E --" alias GS='git status' alias GD='git diff' alias GL='git log --abbrev-commit' alias GLL='git log' alias GLM='git log --no-merges' alias GLMA='git log --no-merges --abbrev-commit' alias GLMP='git log --all --graph --decorate --oneline --no-merges' alias GLP='git log --all --graph --decorate --oneline' alias CU=cmnew RL=rlog RD=rcsdiff alias \ XRB='xrandr --fb 2560x1440 --output DisplayPort-2 --mode 640x480 --panning 2560x1440' alias XRS='xrandr --fb 2560x1440 --output DisplayPort-2 --mode 2560x1440 --panning 0x0' alias pc1='ping -c1' alias c=cat alias exit_sh='svdirs&&exit' [ -t 0 ] && stty erase ^? kill ^u shopt -u sourcepath shopt -s checkwinsize shopt -s no_empty_cmd_completion shopt -s histreedit shopt -s histverify case $HISTFILE in ~/histfiles/*) shopt -u histappend;; *) shopt -s histappend;; esac enable cut 2>/dev/null echo $HISTFILE | grep -E -q histfiles && [ -r $HISTFILE.dirs ] && [ $(dirs -v | wc -l) -eq 1 ] && { for i in $(tac $HISTFILE.dirs | rev | cut -f1 -d' ' | rev); do i=$(eval echo $i) # tilde expansion [ -d $i ] && pd $i done ppd -0 } ulimit -c unlimited unset i j