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 # The contents of /etc/debian_chroot will be printed in the prompt. You can
10 # create this file in chroot environments to know where you are.
11 if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then
12 debian_chroot=$(cat /etc/debian_chroot)
15 # Prompt: user@host:directory$
16 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\n\$ '
18 # Check for unsupported TERM variable
19 if ! tput init &> /dev/null; then
20 echo "Warning! TERM=$TERM unsupported, using TERM=xterm"
24 # The all important colours!
25 ssource "${HOME}/.bash/colors"
27 # xterm titlebar displays 'hostname:workingdir'
28 if tput hs || tput tsl &> /dev/null; then
29 PROMPT_COMMAND='tput tsl; echo -n "$(hostname| cut -d. -f1):${PWD/$HOME/~}"; tput fsl;'
32 # screen window displays current command
35 PROMPT_COMMAND="$PROMPT_COMMAND echo -ne '\033k\033\\'"
40 alias ls='ls --color=auto'
45 alias f='find . -iname'
46 alias webshare='python -c "import SimpleHTTPServer; SimpleHTTPServer.test()"'
49 alias grep='grep --color=auto --exclude "*.svn-base"'
50 alias scp='scp -o ControlPath=none'
52 alias vv='vncviewer -encodings "tight hextile copyrect"'
54 # Bash should check the terminal size after every command terminates
56 # Don't attempt to tab-complete an empty line
57 shopt -s no_empty_cmd_completion
59 # Local customisations
60 ssource "${HOME}/.bash/interactive_local"
62 # Load bash completion if available
63 [ -r "/etc/bash_completion" ] && source "/etc/bash_completion"