changeset 8:aa5e55aa62ef

Moved specific section to top of .bash_aliases, so other bits can be set based on it. Then changed the sshfs mounts to add a ",volname=<foo>" on Macs (cleaner mounts on the desktop).
author huston@80426f53-59d1-405d-934b-f07cd76f4a1a
date Fri, 17 Apr 2009 04:02:24 +0000
parents 1e8e782fccab
children 09e941fe3c02
files .bash_aliases
diffstat 1 files changed, 18 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/.bash_aliases	Mon Apr 13 03:38:53 2009 +0000
+++ b/.bash_aliases	Fri Apr 17 04:02:24 2009 +0000
@@ -1,3 +1,15 @@
+# Mac OS X specific
+[[ `uname` == "Darwin" ]] && {
+   # DARWIN is used for the SSHFS mounts below
+   DARWIN="yes"
+   alias ls='ls -FG'
+}
+
+# Linux specific
+[[ `uname` == "Linux" ]] && {
+   alias ls='ls --color=auto -F'
+}
+
 # SSH aliases
 alias dh='ssh srhuston.net'
 alias dvra='ssh dvra@laurel.dreamhost.com'
@@ -17,18 +29,9 @@
 alias vi='vim'
 
 # SSHFS mounts
-alias junkpile='sshfs -oreconnect,volname=Junkpile srhuston.net:junkpile ~/junkpile'
-alias sharm='sshfs -oreconnect harmonic.srhuston.net: ~/harmonic'
-alias sj='sshfs -oreconnect,volname=Joshua joshua.srhuston.net: ~/joshua'
-alias ssrh='sshfs -oreconnect srhuston.net: ~/srhuston.net'
-alias sx='sshfs -oreconnect xanadu.astro.princeton.edu: ~/xanadu'
-
-# Mac OS X specific
-[[ `uname` == "Darwin" ]] && {
-   alias ls='ls -FG'
-}
-
-# Linux specific
-[[ `uname` == "Linux" ]] && {
-   alias ls='ls --color=auto -F'
-}
+# The $DARWIN check fills in a nice volname if this is a Mac
+alias junkpile="sshfs -oreconnect${DARWIN:+,volname=Junkpile} srhuston.net:junkpile ~/junkpile"
+alias sharm="sshfs -oreconnect${DARWIN:+,volname=Harmonic} harmonic.srhuston.net: ~/harmonic"
+alias sj="sshfs -oreconnect${DARWIN:+,volname=Joshua} joshua.srhuston.net: ~/joshua"
+alias sdh="sshfs -oreconnect${DARWIN:+,volname=srhuston.net} srhuston.net: ~/srhuston.net"
+alias sx="sshfs -oreconnect${DARWIN:+,volname=Xanadu} xanadu.astro.princeton.edu: ~/xanadu"