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