From: W. Trevor King Date: Tue, 1 Jun 2010 17:46:06 +0000 (-0400) Subject: Move path definitions forward in _bashrc X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9c41afb6929cc7949ae011929d25bdd5837dde17;p=dotfiles-public.git Move path definitions forward in _bashrc This way they are defined even for non-interactive sessions. An example where this is necessary is for the target of an hg push ssh://... Where you can't install Mercurial systemwide on the target. Mercurial logs in using ssh without setting up a prompt, but we still need to define a PATH and PYTHONPATH including the Mercurial install locations: ~/bin/hg ~/lib/python2.5/site-packages/mercurial-1.5.3-py2.5-linux-i686.egg/ Actually, the .egg directory is added in ~/lib/python2.5/site-packages/easy-install.pth So we only need ~/lib/python2.5/site-packages/ in our PYTHONPATH. --- diff --git a/_bashrc b/_bashrc index 744951e..35ebae2 100644 --- a/_bashrc +++ b/_bashrc @@ -6,7 +6,20 @@ if [ -f /etc/bashrc ]; then . /etc/bashrc fi -# If not running interactively, don't do anything +# personalize path +export PATH=$HOME/bin:$HOME/script:$HOME/script/python:$HOME/script/lab:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games +export LD_LIBRARY_PATH=~/lib + +# personalize latex path +export TEXINPUTS=":.:$HOME/projects/latex/common/" + +# personalize python path +export PYTHONPATH=".:$HOME/lib/python:$HOME/lib/python2.5/site-packages:$HOME/.python" + +# append personal manpages to manpath +export MANPATH=":$HOME/share/man" + +# If not running interactively, don't do anything else [ -z "$PS1" ] && return # don't put duplicate line in the history and ignore lines starting @@ -129,19 +142,6 @@ fi export EDITOR="/usr/bin/emacs -nw" export PAGER="less" -# personalize path -export PATH=$HOME/bin:$HOME/script:$HOME/script/python:$HOME/script/lab:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games -export LD_LIBRARY_PATH=~/lib - -# personalize latex path -export TEXINPUTS=":.:$HOME/projects/latex/common/" - -# personalize python path -export PYTHONPATH=".:$HOME/lib/python:$HOME/lib/python2.5/site-packages:$HOME/.python" - -# append personal manpages to manpath -export MANPATH=":$HOME/share/man" - # colorize file listings (di was 34 (blue), swapped with 33 (yellow)) export LS_COLORS='no=00:fi=00:di=00;33:ln=00;36:pi=40;34:so=00;35:bd=40;34;01:cd=40;34;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'