X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/68aea1d9f03a2354f5c94c4855f08ed79162e801..8cb7626b2cd04ec89f7eaa7cf388c8ec24f571b3:/bashrc diff --git a/bashrc b/bashrc index a172640..755dffa 100644 --- a/bashrc +++ b/bashrc @@ -1,6 +1,4 @@ -# -*-sh-*- -# -# $Id: .bashrc,v 1.6 1996/12/08 20:33:42 mdw Exp $ +# -*- mode: sh; coding: utf-8 -*- # # Bash session things # @@ -21,7 +19,7 @@ if [ -t 0 ]; then PS2="> " PS4="+ " else - + case "$TERM" in linux*|screen*|xterm*|vt100*) bold='\[\]' unbold='\[\]' nl='\[ \]' ;; @@ -30,10 +28,11 @@ if [ -t 0 ]; then esac if (( EUID == 0 )); then - left="«" right="»" + left=`echo « | iconv -f utf8 -t //translit` + right=`echo » | iconv -f utf8 -t //translit` else case $USER in - mdw|mwooding) + mdw|mwooding) u="" left="[" right="]" ;; *) @@ -43,7 +42,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 +85,7 @@ shopt -u shift_verbose shopt -s sourcepath # --- Set the CDPATH --- -# +# # CDPATH=~/src:/usr/src:/usr/lib:/usr/share # dots=.. # i=6 @@ -123,13 +122,16 @@ alias ssync="rsync -e ssh" alias rootly=$__MDW_ROOTLY alias r=rootly alias re="rootly $EDITOR" -alias pstree="pstree -Ghl" +alias pstree="pstree -hl" alias cdtmp='cd ${TMPDIR-/tmp}' alias pushtmp='pushd ${TMPDIR-/tmp}' 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 +236,13 @@ pathhack () { continue ;; --) - shift + shift break ;; [-+]*) - ;; + ;; *) - break + break ;; esac hack=${arg#[+-]} @@ -251,16 +253,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