X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/32f790cc0e7d26f37aedd19a5cc59e6668632106..e63a1191b698c7aad55fcaa5b02b6e3d6019df27:/bashrc diff --git a/bashrc b/bashrc index 82d50c8..4e941d1 100644 --- a/bashrc +++ b/bashrc @@ -21,7 +21,7 @@ if [ -t 0 ]; then PS2="> " PS4="+ " else - + case "$TERM" in linux*|screen*|xterm*|vt100*) bold='\[\]' unbold='\[\]' nl='\[ \]' ;; @@ -33,7 +33,7 @@ if [ -t 0 ]; then left="«" right="»" else case $USER in - mdw|mwooding) + mdw|mwooding) u="" left="[" right="]" ;; *) @@ -43,7 +43,7 @@ if [ -t 0 ]; then if [ "$__mdw_tty" = "`tty`" ]; then left="<" right=">" else - export __mdw_tty="`tty`" + export __mdw_tty="`tty`" fi fi @@ -86,7 +86,7 @@ shopt -u shift_verbose shopt -s sourcepath # --- Set the CDPATH --- -# +# # CDPATH=~/src:/usr/src:/usr/lib:/usr/share # dots=.. # i=6 @@ -130,6 +130,9 @@ alias e="$EDITOR" alias svn="svnwrap svn" alias @="ssh" +[ -r /etc/bash_completion ] && . /etc/bash_completion +[ -r $HOME/.bash_completion ] && . $HOME/.bash_completion + # --- Make `xt' start an xterm, maybe logging into a remote host --- xt () { @@ -234,13 +237,13 @@ pathhack () { continue ;; --) - shift + shift break ;; [-+]*) - ;; + ;; *) - break + break ;; esac hack=${arg#[+-]} @@ -251,16 +254,16 @@ pathhack () { } case "$arg,$force,:$PATH:" in -*,*,*:"$dir":*) - path-remove path "$dir" + path-remove path "$dir" ;; +*,t,*:"$dir":*) - path-remove path "$dir" + path-remove path "$dir" path-add path "$dir" ;; +*,nil,*:"$dir":*) - ;; + ;; +*,*) - path-add path "$dir" + path-add path "$dir" ;; esac shift @@ -298,4 +301,6 @@ if (( UID == 0 )); then set -o noclobber fi +[ -f "$HOME/.bashrc-local" ] && . "$HOME/.bashrc-local" + fi