Sample .bashrc: Difference between revisions
From Genecats
Jump to navigationJump to search
(Created page with " <pre> # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # get colors on ls in emacs! alias ls='ls --color=auto' # various command shortcuts alias og='l...") |
No edit summary |
||
| Line 1: | Line 1: | ||
This is a sample .bashrc file that can be copied and used by new employees. Two things are specific to QAers: one of the directories in the PATH environment variable, and setting the HGDB_CONF variable on hgwbeta. | |||
This is meant to be a starting point; you should edit your own settings to customize settings for yourself. Please feel free to edit this version, too! | |||
<pre> | <pre> | ||
| Line 15: | Line 18: | ||
alias dir='ls -lrt' | alias dir='ls -lrt' | ||
alias h='history' | alias h='history' | ||
alias p='pwd -P' # shows the "real" path, not the path via symlinks | alias p='pwd -P' # shows the "real" path in bash, not the path via symlinks | ||
alias et='emacs-tty' | alias et='emacs-tty' | ||
alias genome-mysql='mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A' | alias genome-mysql='mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A' | ||
| Line 43: | Line 46: | ||
export PATH=/cluster/software/bin:/hive/groups/qa/bin/x86_64:/cluster/bin/$MACHTYPE:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/cluster/bin/scripts:$HOME/bin/$MACHTYPE:$HOME/bin/ | export PATH=/cluster/software/bin:/hive/groups/qa/bin/x86_64:/cluster/bin/$MACHTYPE:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/cluster/bin/scripts:$HOME/bin/$MACHTYPE:$HOME/bin/ | ||
# Notes on PATH: | # Notes on PATH: | ||
# /cluster/software/bin/ is where the official installation of python2.7 lives. | # /cluster/software/bin/ is where the official installation of python2.7 lives. Everyone on browser-staff should use it. | ||
# /hive/groups/qa/bin/x86_64/ is a special directory for all QAers: if QA needs to temporarily use an older | # /hive/groups/qa/bin/x86_64/ is a special directory for all QAers: if QA needs to temporarily use an older | ||
# version of a utility (sometimes this is needed for utilities used for make beta/public in trackDb), it can go here. | # version of a utility (sometimes this is needed for utilities used for make beta/public in trackDb), it can go here. | ||
| Line 51: | Line 54: | ||
export USE_BAM=1 | export USE_BAM=1 | ||
# use the correct .hg.conf file, based on host (hgsql | # use the correct .hg.conf file, based on host (the HGDB_CONF variable tells programs like hgsql what file to use) | ||
# after hgwdev moves to San Diego, this may become moot | # after hgwdev moves to San Diego, this may become moot | ||
if [ $HOST = "hgwbeta" ] | if [ $HOST = "hgwbeta" ] | ||
Revision as of 07:48, 1 July 2013
This is a sample .bashrc file that can be copied and used by new employees. Two things are specific to QAers: one of the directories in the PATH environment variable, and setting the HGDB_CONF variable on hgwbeta.
This is meant to be a starting point; you should edit your own settings to customize settings for yourself. Please feel free to edit this version, too!
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# get colors on ls in emacs!
alias ls='ls --color=auto'
# various command shortcuts
alias og='ls -ogrt'
alias l='ls -l'
alias lc='ls -C'
alias dir='ls -lrt'
alias h='history'
alias p='pwd -P' # shows the "real" path in bash, not the path via symlinks
alias et='emacs-tty'
alias genome-mysql='mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A'
alias python=python2.7
# directories I like
alias tdb='cd ~/kent/src/hg/makeDb/trackDb'
alias mdb='cd ~/kent/src/hg/makeDb'
alias doc='cd ~/kent/src/hg/makeDb/doc'
alias schema='cd ~/kent/src/hg/makeDb/schema'
alias tracks='cd ~/tracks'
alias htdocs='cd /usr/local/apache/htdocs'
alias err='cd /usr/local/apache/logs'
# environment
export PS1='[\u@\h \W]$ ' # Set the command prompt to host and working dir
export HOST=`uname -n`
export EDITOR=vim
export MACHTYPE=x86_64
export WEEKLYBLD=/cluster/bin/build/scripts
export JAVA_HOME=/usr/java/default
export _JAVA_OPTIONS=-Xmx2048m
export MYSQLLIBS="/usr/lib64/mysql/libmysqlclient.a -lz"
export MYSQLINC=/usr/include/mysql
export HGCGI=/usr/local/apache/cgi-bin
export CLASSPATH=.:/usr/share/java:/usr/java/default/jre/lib/rt.jar:/usr/java/default/jre/lib:/usr/share/java/httpunit.jar:/cluster/bin/java/jtidy.jar:/usr/share/java/rhino.jar:/cluster/bin/java/mysql-connector-java-3.0.16-ga-bin.jar
export PATH=/cluster/software/bin:/hive/groups/qa/bin/x86_64:/cluster/bin/$MACHTYPE:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/cluster/bin/scripts:$HOME/bin/$MACHTYPE:$HOME/bin/
# Notes on PATH:
# /cluster/software/bin/ is where the official installation of python2.7 lives. Everyone on browser-staff should use it.
# /hive/groups/qa/bin/x86_64/ is a special directory for all QAers: if QA needs to temporarily use an older
# version of a utility (sometimes this is needed for utilities used for make beta/public in trackDb), it can go here.
# environment settings for building my own sandbox
export USE_SSL=1
export USE_BAM=1
# use the correct .hg.conf file, based on host (the HGDB_CONF variable tells programs like hgsql what file to use)
# after hgwdev moves to San Diego, this may become moot
if [ $HOST = "hgwbeta" ]
then
export HGDB_CONF=~/.hg.conf.beta
fi
# make files and dirs you create writeable by others in the group
umask 002
# for python development: see kent/python/virtual.txt to set up a virtual environment
# source ~/ENV/bin/activate
# The rest are from Brooke's .basrhc; not everyone will need/want them
# Do not do stty when it is not a tty
tty > /dev/null 2> /dev/null
if [ "$?" -eq 0 ]; then
stty erase ^?
stty intr ^C
fi
# prevent sighup from killing background jobs
trap "" SIGHUP
# for emacs shell mode:
[ -n "$PS1" -a -n "$TERM" ] && {
# Under emacs, keep tty sane. also disable more/less.
[ -n "${EMACS:-}" ] && {
stty -icrnl -onlcr -echo susp ^Z
export PAGER=cat
export TERM=emacs
}
}