summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-11-01 14:31:21 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-11-01 14:31:21 -0500
commit6956ab93eab0cf9139034cbba403c135e3f44a7d (patch)
treef97fcb7c25c5ccde7dfb9c8e662dc17aabd171e0
parent3e4097acff73282ba139b6d18d75105d2c6c62b8 (diff)
bashrc: Change PS1.
-rw-r--r--dotfiles/.bashrc10
1 files changed, 4 insertions, 6 deletions
diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc
index 09efb5f..a49f5c6 100644
--- a/dotfiles/.bashrc
+++ b/dotfiles/.bashrc
@@ -33,14 +33,12 @@ shopt -s checkwinsize
# files and zero or more directories and subdirectories.
shopt -s globstar
-# Add the shell level to PS1 if we're in a deeply nested shell.
-if [ $SHLVL -gt 3 ]
+# Add special decoration when we are in a Guix environment sub-shell.
+if [ -n "$GUIX_ENVIRONMENT" ]
then
- # A tty in a terminal emulator is typically at shell level 3.
- ((level = $SHLVL - 3))
- PS1='\u@\h \w [$level]\$ '
+ export PS1="[dev] \u@\h \w\$ "
else
- PS1='\u@\h \w\$ '
+ export PS1='\u@\h \w\$ '
fi
alias ls='ls -p --color'