3 # Sets up the shell for interactive commands
5 # Use the terminfo backspace character as the erase character. This is not
6 # enabled by default because terminfo is often broken.
7 #stty erase $(tput kbs)
9 # Basic prompt only: user@host:directory$
12 # Check for unsupported TERM variable
13 if ! tput init &> /dev/null; then
14 echo "Warning! TERM=$TERM unsupported, using TERM=xterm"
18 # The all important colours!
19 ssource "${HOME}/.bash/colors"
21 # xterm titlebar displays 'hostname:workingdir'
22 if tput hs || tput tsl &> /dev/null; then
23 PROMPT_COMMAND='tput tsl; echo -n "$(hostname| cut -d. -f1):${PWD/$HOME/~}"; tput fsl;'
26 # screen window displays current command
29 PROMPT_COMMAND="$PROMPT_COMMAND echo -ne '\033k\033\\'"
34 alias ls='ls --color=auto'
39 alias f='find . -iname'
40 alias webshare='python -c "import SimpleHTTPServer; SimpleHTTPServer.test()"'
43 alias grep='grep --color=auto --exclude "*.svn-base"'
44 alias scp='scp -o ControlPath=none'
46 alias vv='vncviewer -encodings "tight hextile copyrect"'
47 alias watch='watch -n1'
53 LESS_TERMCAP_md=$'\E[01;38;5;74m' \
54 LESS_TERMCAP_me=$'\E[0m' \
55 LESS_TERMCAP_us=$'\E[04;38;5;146m' \
56 LESS_TERMCAP_ue=$'\E[0m' \
60 # Sets colours to be appropriate for a light on dark terminal
63 source "${HOME}/.bash/colors"
66 # Sets the colours to be appropriate for a dark on light terminal
69 source "${HOME}/.bash/colors"
73 # Creates the directory if it doesn't exist, and changes into it
79 # Usage: vimf somefile
80 # Does a recursive search of the current directory for somefile, then edits it
82 find . -name "${1}" -exec vim '{}' +
85 # Sets the nice and ionice priorities for the current shell to the lowest values
92 # Bash should check the terminal size after every command terminates
95 # Don't attempt to tab-complete an empty line
96 shopt -s no_empty_cmd_completion
98 # Local customisations
99 ssource "${HOME}/.bash/interactive_local"
101 # Load bash completion if available
102 [ -r "/etc/bash_completion" ] && source "/etc/bash_completion"