chiark / gitweb /
dot/bashrc: Do check for SCHROOT_SESSION_ID when defining setprompt, rather than...
[ian-dotfiles.git] / dot / bashrc
index a173c4b6fb8ac8b9a989e4e4d2db02fc153fa410..ab1b5d354abbc69e54b50d6beb8ae036e535423e 100644 (file)
@@ -11,11 +11,13 @@ export PWD
 # My own functions
 ls() { /bin/ls -FC "$@"; }
 ll() { /bin/ls -FCla "$@"; }
-setprompt() {
-  if [ "x$SCHROOT_SESSION_ID" = x ]; then
-    PS1=`autotitle`; export PS1;
-  fi
- }
+
+if [ "x$SCHROOT_SESSION_ID" = x ]; then
+    setprompt() { PS1=`autotitle`; export PS1; }
+else
+    setprompt() { :; }
+fi
+
 rs() { eval `/usr/openwin/bin/resize` ; setprompt ; }
 cd() { builtin cd "$@"; setprompt; }
 pu() { builtin pushd "$@"; setprompt; }