diff options
-rw-r--r-- | dotfiles/.bashrc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index 950ef3c..58cb607 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -33,8 +33,17 @@ shopt -s checkwinsize # files and zero or more directories and subdirectories. shopt -s globstar -PS1='\u@\h \w\$ ' +# Add the shell level to PS1 if we're in a deeply nested shell. +if [ $SHLVL -gt 3 ] +then + # A tty in a terminal emulator is typically at shell level 3. + ((level = $SHLVL - 3)) + PS1='\u@\h \w [$level]\$ ' +else + PS1='\u@\h \w\$ ' +fi + alias ls='ls -p --color' alias ll='ls -l' -alias guix-dev-env="cd Code/guix; guix environment -e '(@@ (gnu packages package-management) guix-devel)'" +alias guix-dev-env="cd ~/Code/guix; guix environment -e '(@@ (gnu packages package-management) guix-devel)'" |