Append [grid] to prompt when we think we're running from the grid.
authorIain Patterson <me@iain.cx>
Tue, 8 Jul 2008 12:43:37 +0000 (12:43 +0000)
committerIain Patterson <me@iain.cx>
Tue, 8 Jul 2008 12:43:37 +0000 (12:43 +0000)
git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@114 6be0d1a5-5cfe-0310-89b6-964be062b18b

.profile.d/prompt.bashrc

index e6a8236..ca55679 100644 (file)
@@ -12,6 +12,12 @@ if [ ! -z "$SSH_FORWARDED" ]; then
   fi
 fi
 
+# Unscientific check for grid jobs.
+case ${SSH_CLIENT##* } in
+  22|2222);;
+  *) SSH_FORWARDED="$SSH_FORWARDED [grid]"
+esac
+
 info="$HOSTNAME$SSH_FORWARDED"
 
 # Check for vim.