Bashrc

From Attie's Wiki
Revision as of 13:34, 9 September 2011 by Attie (Talk | contribs)

Jump to: navigation, search

Below is the extended contents of my '~/.bashrc' file (after the system stuffs)

if [ "$BASH_DEPTH" = "" ]; then
  BASH_DEPTH=0
else
  BASH_DEPTH=$((BASH_DEPTH + 1))
fi
export BASH_DEPTH
export EDITOR="nano"
PS1="\[\e]0;\u@\h:\w\007\]\[\e[0;33m\]\T \[\e[32m\]\u\[\e[90m\]@"
PS1="$PS1\[\e[35m\]\h\[\e[90m\]:\[\e[36m\[\w \[\e[0m\][\$BASH_DEPTH:\j]"
if [ "`whoami`" = "root" ]; then
  PS1="\[\e[0m\]#\[\e[91m\]#\[\e[31m\]# $PS1 \[\e[31m\]#\[\e[91m\]#\[\e[0m\]#"
else
  PS1="\[\e[0m\]#\[\e[94m\]#\[\e[34m\]# $PS1 \[\e[34m\]#\[\e[94m\]#\[\e[0m\]#"
fi
PS1="$PS1\n\$ "
export PS1
export PATH=~/.bin:$PATH
 
if [ "$WINDOWID" != "" ]; then
  xrdb ~/.Xresources
fi
 
alias xterm="BASH_DEPTH=\"\" xterm"
alias nano="nano -wzSAi -T 2"
alias less="less -cR"
alias su="sudo su"
alias ll="ls -l"
alias x="exit"

See also Xresources

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox