Commit Diff


commit - b962b25ecaf6ddb11a36235d4a9849a147b4f6a3
commit + acffdcb6eed3385e1566c0ac86fb6b4bc130664b
blob - e5ef2735ce2a30f25990671202c0fa4252ed1209
blob + b5a46bc89252b4cd2cda1b1433e393c396aeee19
--- mac/9term.app/Contents/MacOS/9term
+++ mac/9term.app/Contents/MacOS/9term
@@ -1,9 +1,29 @@
 #!/bin/bash
-cd $HOME
-. ~/.bashrc
+fshell=$(finger $(whoami) | sed -n 's/.*Shell: //p' | sed 1q)
+SHELL=${fshell:-$SHELL}
 PLAN9=${PLAN9:-/usr/local/plan9}
+cd $HOME
+case "$SHELL" in
+*/rc)
+	echo '
+		if(! ~ $PLAN9/bin $path)
+			path=($path $PLAN9/bin)
+		$PLAN9/bin/9term -l -W600x800 &
+	' | $SHELL -l
+	exit 0
+	;;
+*/bash)
+	. ~/.bash_profile
+	;;
+*)
+	. ~/.profile
+	;;
+esac
+
 if ! [[ :$PATH: =~ :$PLAN9/bin: ]]
 then
 	PATH=$PATH:$PLAN9/bin
 fi
 $PLAN9/bin/9term -l -W600x800 &
+exit 0
+