Jump to content
Toggle menu
  • 28 articles
  • 16 files
  • 17 users
  • 2.5K edits
Jon's Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Nifty things to put in your ~/.bashrc

# syntax highlighting less:
# sudo apt-get install source-highlight
# and comment out a line in ~/.bashrc that looks like this:
# [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
export LESS=" -R "
export LESSCLOSE="/usr/bin/lesspipe %s %s"
export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh \"%s\""

# syntax-highlighting cat:
# sudo apt-get install python-pygments
alias ccat='pygmentize -g'

# Or, cat your stuff in rainbows!
# sudo gem install lolcat
alias cat=lolcat

Nifty colour prompt, with current git branch (if any)
export PS1='\[\e[1m\]\u@\h:\w\[\e[32;1m\]$(__git_ps1 "(%s)")\[\e[m\e[1m\]$\[\e[m\] '