From 6956ab93eab0cf9139034cbba403c135e3f44a7d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 1 Nov 2015 14:31:21 -0500 Subject: bashrc: Change PS1. --- dotfiles/.bashrc | 10 ++++------ 1 file 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' -- cgit v1.2.3