Saturday, 11 October 2008

my bash setup

Here are some things I put in ~/.bashrc or /etc/bash.bashrc to make my life easier:

# When using bash, I use ctrl+r a lot to find commands I executed recently.
# I found that I remember my commands for much longer than bash does,
# so I increased my bash's memory:
export HISTFILESIZE=3000 # the bash history should save 3000 commands
export HISTCONTROL=ignoredups # don't put duplicate lines in the history.
export HISTCONTROL=ignoreboth # ignore same sucessive entries.
# (from

# I like to have a colour prompt with my user, the machine I'm on and the full
# path. Its a bit long so I put it on 2 lines.
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;33m\]\w\[\033[00m\]>\n\$ '

# enable bzr command auto completion
. /opt/bzr/bzr.current/contrib/bash/bzr.simple

# bzr aliasses
alias bt='./bzr --no-plugins selftest'
alias bd='bzr diff'
alias bl='bzr log'
alias bp='bzr pull -v |less'
alias bm='bzr missing |less'
alias bs='bzr status'

# bzr functions, which cant be done by alias or bzr's alias
#the $@ inserts all the parameters you pass in
bzr help "$@" |less

bzr cdiff "$@" | less -R

No comments:

Post a Comment