Simplicitiy is the ultimate sophistication (scrot, raw, dl) (+2 likes)
andor Jun 28, 2011 (shells/bash)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Check for an interactive session
[ -z "$PS1" ] && return
#alias ls='ls --color=auto'
alias ls='/usr/bin/vendor_perl/ls++'
PS1='\u@\h \W > '
alias fullupdate='sudo yaourt -Syu --aur --noconfirm'
export EDITOR=nano
dir='/usr/share/cows/'
file=`/bin/ls -1 "$dir" | sort --random-sort | head -1`
cow=$(echo "$file" | sed -e "s/\.cow//")
fortune -a | cowsay -f $cow
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PSPSDK="/home/andor/psp/pspsdk/psp/sdk"
export PS1='\[\033[0;31m\]\u \[\033[1;36m\]\w $(parse_git_branch)\n\[\033[1;32m\]> \[\033[00m\]'
|
x
Notes
A dead-simple .bashrc (I prefer simple stuff)
- displays username and full path
- displays random fortune along with a random ‘cowsay’ (you need the corresponding package for this to work, in my case extra/cowsay and extra/fortune-mod on ArchLinux)
- no special case for root shell
- git branch stolen from here
- aliased the default ls to ls++
- font is misc-fixed-medium @ 11pt