# Chess Griffin's .bashrc # # # Version History # 0.1 2002-03-18 # 0.2 2002-11-02 # 0.3 2004-07-28 # 0.4 2005-08-09 # 0.5 2006-12-10 # # The sky was yellow and the sun was blue # # Source global bashrc if it exists if [ -f /etc/bashrc ]; then . /etc/bashrc fi # Export some variables export EDITOR=/usr/bin/vim # the one and only editor export HISTFILESIZE=3000 # save 3000 commands export HISTCONTROL=ignoredups # no duplicate lines in the history. PATH=$PATH:/usr/local/bin:/home/chess/bin:/home/chess/scripts export PATH export TMPDIR=/home/chess/tmp # Set some colors BLACK='\e[0;30m' BLUE='\e[0;34m' GREEN='\e[0;32m' CYAN='\e[0;36m' RED='\e[0;31m' PURPLE='\e[0;35m' BROWN='\e[0;33m' LIGHTGRAY='\e[0;37m' DARKGRAY='\e[1;30m' LIGHTBLUE='\e[1;34m' LIGHTGREEN='\e[1;32m' LIGHTCYAN='\e[1;36m' LIGHTRED='\e[1;31m' LIGHTPURPLE='\e[1;35m' YELLOW='\e[1;33m' WHITE='\e[1;37m' NC='\e[0m' # No Color # Set some aliases # # Aliased commands alias ..='cd ..' alias cd..='cd ..' alias cr='chmod a+r' alias cx='chmod a+x' alias da='date "+%Y-%m-%d %A %T %Z"' alias df='df -h' alias doc2html='xsltproc /usr/share/xml/docbook/xhtml/docbook.xsl' alias doc2multihtml='xsltproc /usr/share/xml/docbook/xhtml/chunk.xsl' alias docvalidate='xmllint --valid --noout' alias du='du -k' alias hist='history | grep $1' # requires one input alias l='ls -CF' alias la='ls -A' alias ll='ls -l' alias ls='ls --color=auto' alias lsmod='lsmod | sort | less' alias ping='ping -c 5' alias ps='ps auxf' alias rrm='rm -rf' alias screen='screen -RD' alias un='tar -zxvf' # # Aliases for using ssh into my local and remote boxes alias server1='ssh -p 12345 user@example.com' alias server2='ssh -p 12345 user@myserverbox' alias printserver='ssh -p 12345 user@myprintserver' alias laptop='ssh -p 12345 user@laptop' # # Aliases to some of my scripts alias podcastup='sh ~/scripts/podcast.sh' alias slackup='sh ~/scripts/mirror-slackware.sh' alias syncserver='sh ~/scripts/syncserver.sh' # # Other miscellaneous aliases alias home='cd ~' alias varlog='cd /var/log' alias scripts='cd ~/scripts' # Set my default prompt #PS1="\[\033[01;32m\]\u@\h \[\033[01;33m\]\@ \[\033[01;34m\]\w \$ \[\033[00m\]" # The above is the same as below without the variable names PS1="\[$LIGHTGREEN\]\u@\h \[$YELLOW\]\@ \[$LIGHTBLUE\]\w \$ \[$NC\]" test -n "$DISPLAY" && export TERM=xterm-color # Start Screen upon SSH if [ "$SSH_CONNECTION" ]; then if [ -z "$STY" ]; then exec screen -d -R fi fi # If this is an xterm set the title to user@host:dir #case "$TERM" in # xterm*|rxvt*) # PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: # ${PWD}\007"' # ;; # *) # ;; #esac # Gotta love ASCII art with figlet figlet "Welcome, " $USER;