aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-05-16 01:36:06 -0300
committerEuAndreh <eu@euandre.org>2022-05-16 01:36:09 -0300
commit776275d9a76d4c5936a3f2ba1c3d3fe73ba2e946 (patch)
treed2c44ff6984946312908b88447248a1c354f7c15
parentetc/bash/rc: explicitly set $HISTSIZE to -1 to represent the infinite value (diff)
downloaddotfiles-776275d9a76d4c5936a3f2ba1c3d3fe73ba2e946.tar.gz
dotfiles-776275d9a76d4c5936a3f2ba1c3d3fe73ba2e946.tar.xz
etc/bash/rc: Use "-e" instead of "-r" before sourcing files
I previously had the impression that "-r" tested for a "readable file", when it actually works on directories too. So I'm sticking to the more general "-e" instead.
-rw-r--r--etc/bash/rc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/bash/rc b/etc/bash/rc
index 3990ebe..1cfd404 100644
--- a/etc/bash/rc
+++ b/etc/bash/rc
@@ -20,7 +20,7 @@ mkdir -p \
"$XDG_LOG_HOME"
GUIX_PROFILE="$XDG_CONFIG_HOME"/guix/current
-if [ -r "$GUIX_PROFILE"/etc/profile ]; then
+if [ -e "$GUIX_PROFILE"/etc/profile ]; then
. "$GUIX_PROFILE"/etc/profile
fi
@@ -325,7 +325,7 @@ chmod 600 "$XDG_CONFIG_HOME"/ssh/id_rsa.pub
stty -ixon # Disable C-s/C-q mode
-if [ -r "$XDG_CONFIG_HOME"/bash/privrc.sh ]; then
+if [ -e "$XDG_CONFIG_HOME"/bash/privrc.sh ]; then
# Extra rc code to be loaded, stored in private repository
. "$XDG_CONFIG_HOME"/bash/privrc.sh
fi