Tuesday, January 27, 2009

configuring your shell env

How often did you have to write your .bashrc file all over again because you changed your job.  I end up writing/copying it every time and its a bit tired. So here I aim add template bashrc for reuse.
-------------------------------------------------------
#!/bin/sh
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
  . /etc/bashrc
fi

# use vim style editing of commandline
set -o vi

#make sure cp always creates a backup file
alias cp='cp --backup'

# have history igonre rm. save you from accidently doing !r and deleting stuff you
# did not intend to delete
export HISTIGNORE="rm*:&"

export PATH=/usr/local/ant/1.6.5/bin:~/scripts/:$PATH
export JAVA_HOME=/usr/local/jdk/1.5.0_09/

export PATH=/usr/local/jdk/1.5.0_09/bin:$PATH

export CVSROOT=:pserver:${LOGNAME}@10.1.1.40:/CVSrep

# if you are mysql user, this sets your mysql prompt
export MYSQL_PS1="\\d@\\h>"


unalias vi
alias vi='~/bin/bin/vim'

# hack for weird promts when using patch vim for vimshell
if [[ $TERM == "screen" ]]; then
PROMPT_COMMAND=''
fi

No comments:

Post a Comment