diff options
author | EuAndreh <eu@euandre.org> | 2022-05-16 00:30:01 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-05-16 00:30:01 -0300 |
commit | 004616122241810cf4fd63be8237fc0422b1b2f9 (patch) | |
tree | aaadf3a66109ffcb73cbfff579f4524346bc36b2 /etc | |
parent | bin/backup: Fix WARNING message for exit code 0 (diff) | |
download | dotfiles-004616122241810cf4fd63be8237fc0422b1b2f9.tar.gz dotfiles-004616122241810cf4fd63be8237fc0422b1b2f9.tar.xz |
etc/bash/vcs-ps1.sh: Better checking of empty shell variables
Diffstat (limited to 'etc')
-rw-r--r-- | etc/bash/vcs-ps1.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/bash/vcs-ps1.sh b/etc/bash/vcs-ps1.sh index 4b440be..6e74e1d 100644 --- a/etc/bash/vcs-ps1.sh +++ b/etc/bash/vcs-ps1.sh @@ -132,7 +132,7 @@ path() { } guix_env() { - if [ "$GUIX_ENVIRONMENT" != '' ]; then + if [ -n "${GUIX_ENVIRONMENT:-}" ]; then printf '\n' color -c blacki '~> ' color -c purple 'guix environment ' @@ -143,7 +143,7 @@ guix_env() { } in_nix_shell() { - if [ "$IN_NIX_SHELL" != '' ]; then + if [ -n "${IN_NIX_SHELL:-}" ]; then printf '\n' color -c blacki '~> ' color -c purpleb "$IN_NIX_SHELL " |