]> code.delx.au - dotfiles/blob - .bash/interactive
Fixed backspace key properly
[dotfiles] / .bash / interactive
1 #! bash
2
3 # Sets up the shell for interactive commands
4
5 # xterm titlebar displays current command
6 case "${TERM}" in
7 xterm*|rxvt*)
8 HOSTNAME="$(hostname | cut -d '.' -f 1)"
9 CWD_WITHHOME='"$(echo "${PWD}" | sed "s|^${HOME}|~|")"'
10 PROMPT_COMMAND="echo -ne \"\033]0;${HOSTNAME}: ${CWD_WITHHOME}\007\""
11 unset HOSTNAME
12 ;;
13 *)
14 ;;
15 esac
16
17 # Prompt: user@host:directory$
18 PS1='\u@\h:\w\$ '
19
20 # Useful aliases
21 alias ls='ls --color=auto'
22 alias ll='ls -hlF'
23 alias la='ls -ha'
24 alias l='ls -halF'
25 alias rm='rm -i'
26 alias less='less -R'
27
28 # Bash should check the terminal size after every command terminates
29 shopt -s checkwinsize
30
31 # The all important colours!
32 ssource "${HOME}/.bash/colors"
33
34 # Local customisations
35 ssource "${HOME}/.bash/interactive_local"
36