changeset 1:7e33b3191cf7

Merged in settings from home, and at the same time edited some of the tests to be easier to read and make more sense. Also added a lot more comments both for others to read if I post these, and for myself to remember if I'm less caffeinated.
author huston@80426f53-59d1-405d-934b-f07cd76f4a1a
date Fri, 10 Apr 2009 20:02:33 +0000
parents c78481cfb082
children 2b4dcc885071
files .bash_aliases .bash_profile .bashrc
diffstat 3 files changed, 81 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/.bash_aliases	Fri Apr 10 17:51:18 2009 +0000
+++ b/.bash_aliases	Fri Apr 10 20:02:33 2009 +0000
@@ -1,12 +1,20 @@
-alias vi='vim'
-alias r='ssh -l root'
+# SSH aliases
 alias s=ssh
 alias j='ssh joshua.srhuston.net'
-alias rt='ssh -l root typesetter'
+alias x='ssh xanadu.astro.princeton.edu'
+alias r='ssh -l root'
+alias roc='ssh zenoss@rocinante'
+alias dvra='ssh dvra@laurel.dreamhost.com'
+alias dh='ssh srhuston.net'
+
+# Programs
+alias vi='vim'
 alias rot13="tr 'a-zA-Z' 'n-za-mN-ZA-M'"
-alias roc='ssh zenoss@rocinante'
 alias ret='screen -raAx'
 alias bsr='bigscreen -raAx'
+alias irssi-test='irssi --home=~/irssi-test/'
 
-alias dvra='ssh dvra@laurel.dreamhost.com'
-alias dh='ssh srhuston.net'
+# SSHFS mounts
+alias sharm='sshfs -oreconnect harmonic: ~/harmonic'
+alias ssrh='sshfs -oreconnect srhuston.net: ~/srhuston.net'
+alias sx='sshfs -oreconnect xanadu.astro.princeton.edu: ~/xanadu'
--- a/.bash_profile	Fri Apr 10 17:51:18 2009 +0000
+++ b/.bash_profile	Fri Apr 10 20:02:33 2009 +0000
@@ -1,4 +1,7 @@
 # .bash_profile
+# This file is sourced for interactive login shells, or
+# non-interactive shells with the --login option.  So things which you
+# want to happen only on login shells should go here.
 
 # Get the aliases and functions
 if [ -f ~/.bashrc ]; then
@@ -7,12 +10,9 @@
 
 # User specific environment and startup programs
 
-PATH=$PATH:$HOME/bin
-BASH_ENV=$HOME/.bashrc
-EDITOR=vim
-
-export BASH_ENV PATH EDITOR
-unset USERNAME
+# BASH_ENV is sourced for non-interactive shells; however, since we
+# source ~/.bashrc above I don't think we have to here also.
+# export BASH_ENV=$HOME/.bashrc
 
 #if [ "X$SSH_AUTH_SOCK" = "X" ] ; then
 #   eval `/usr/bin/ssh-agent`
--- a/.bashrc	Fri Apr 10 17:51:18 2009 +0000
+++ b/.bashrc	Fri Apr 10 20:02:33 2009 +0000
@@ -1,33 +1,77 @@
 # .bashrc
+# This file is sourced for shells which are interactive but not a
+# login shell; however, since it is also sourced within
+# ~/.bash_profile, the end result is that this file is sourced for all
+# shells.
 
-# User specific aliases and functions
 
 # Source global definitions
 if [ -f /etc/bashrc ]; then
 	. /etc/bashrc
 fi
+
+# User specific aliases and functions
 if [ -f $HOME/.bash_aliases ]; then
    . $HOME/.bash_aliases
 fi
 
+# Environment variables
 export PS1='\h:\w\$ '
-#if [ "$SSH2_AUTH_SOCK" != "" -a "X$SSH_AUTH_SOCK" = "X" ] ; then
-#   export SSH_AUTH_SOCK=$SSH2_AUTH_SOCK
-#fi
+export EDITOR=vim
+
+# Paths
+
+# Standard-ish paths; some of these may be in place already, but if
+# they're not they should probably go near the front of the pack.
+for P in /sbin /usr/sbin /usr/local/sbin /usr/local/bin ; do
+   [[ "$PATH" =~ $P ]] || \
+   export PATH=${P}${PATH:+:$PATH}
+done
 
-# Add local Perl crap
-[[ "$PERL5LIB" =~ "/home/huston/perl" ]] || export PERL5LIB=/home/huston/perl${PERL5LIB:+:$PERL5LIB}
-[[ "$MANPATH" =~ "/home/huston/perl/share/man" ]] || export MANPATH=~/perl/share/man:${MANPATH:+$MANPATH}
-[[ "$PATH" =~ "/home/huston/perl/bin" ]] || export PATH=~/perl/bin${PATH:+:$PATH}
+# Local Perl install
+if [ -d ~/perl ]; then
+   [[ "$PERL5LIB" =~ ~/perl ]] || \
+   export PERL5LIB=~/perl${PERL5LIB:+:$PERL5LIB}
+
+   if [ -d ~/perl/share/man ]; then
+      [[ "$MANPATH" =~ ~/perl/share/man ]] || \
+      export MANPATH=~/perl/share/man:${MANPATH:+$MANPATH}
+   fi
+
+   if [ -d ~/perl/bin ]; then
+      [[ "$PATH" =~ ~/perl/bin ]] || \
+      export PATH=~/perl/bin${PATH:+:$PATH}
+   fi
+fi
 
-# Get the local install paths setup nicely
+# Local install paths - install things to ~/Installs directories, and
+# they will automatically get the proper paths added.  Most things
+# that use autoconf will do this with
+# './configure --prefix=~/Installs'
 for D in ~/Installs/* ; do
-	if [ -d $D/bin ]; then 
-	   [[ "$PATH" =~ "$D/bin" ]] || export PATH=$D/bin${PATH:+:$PATH} ; fi
-	if [ -d $D/share/man ]; then 
-	   [[ "$MANPATH" =~ "$D/share/man" ]] || export MANPATH=$D/share/man:${MANPATH:+$MANPATH} ; fi
-	if [ -d $D/man ]; then 
-	   [[ "$MANPATH" =~ "$D/man" ]] || export MANPATH=$D/man:${MANPATH:+$MANPATH} ; fi
-	if [ -d $D/lib ]; then 
-	   [[ "$LD_LIBRARY_PATH" =~ "$D/lib" ]] || export LD_LIBRARY_PATH=$D/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ; fi
+   if [ -d $D/bin ]; then 
+      [[ "$PATH" =~ "$D/bin" ]] || \
+      export PATH=$D/bin${PATH:+:$PATH}
+   fi
+
+   if [ -d $D/share/man ]; then 
+      [[ "$MANPATH" =~ "$D/share/man" ]] || \
+      export MANPATH=$D/share/man:${MANPATH:+$MANPATH}
+   fi
+   
+   if [ -d $D/man ]; then 
+      [[ "$MANPATH" =~ "$D/man" ]] || \
+      export MANPATH=$D/man:${MANPATH:+$MANPATH}
+   fi
+   
+   if [ -d $D/lib ]; then 
+      [[ "$LD_LIBRARY_PATH" =~ "$D/lib" ]] || \
+      export LD_LIBRARY_PATH=$D/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+   fi
 done
+
+# Now make sure ~/bin is top of the list
+if [ -d ~/bin ]; then
+   [[ "$PATH" =~ ~/bin ]] || \
+   export PATH=~/bin${PATH:+:$PATH}
+fi