aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rw-r--r--sh/profile.d/games.sh3
-rw-r--r--sh/profile.d/keychain.sh8
-rw-r--r--sh/shrc3
-rw-r--r--sh/shrc.d/keychain.sh2
4 files changed, 9 insertions, 7 deletions
diff --git a/sh/profile.d/games.sh b/sh/profile.d/games.sh
index 58db3487..ee56c593 100644
--- a/sh/profile.d/games.sh
+++ b/sh/profile.d/games.sh
@@ -1,2 +1,3 @@
# Add ~/.local/games to PATH if it exists
-[ -d "$HOME"/.local/games ] && PATH=$HOME/.local/games:$PATH
+[ -d "$HOME"/.local/games ] || return
+PATH=$HOME/.local/games:$PATH
diff --git a/sh/profile.d/keychain.sh b/sh/profile.d/keychain.sh
index 9213de7f..f3d25c62 100644
--- a/sh/profile.d/keychain.sh
+++ b/sh/profile.d/keychain.sh
@@ -1,5 +1,5 @@
# keychain setup
-command -v keychain >/dev/null 2>&1 &&
- eval "$(TERM=${TERM:-ansi} keychain \
- --eval --ignore-missing --quick --quiet \
- id_dsa id_rsa id_ecsda)"
+command -v keychain >/dev/null 2>&1 || return
+eval "$(TERM=${TERM:-ansi} keychain \
+ --eval --ignore-missing --quick --quiet \
+ id_dsa id_rsa id_ecsda)"
diff --git a/sh/shrc b/sh/shrc
index 879c8947..33c55e8f 100644
--- a/sh/shrc
+++ b/sh/shrc
@@ -20,5 +20,6 @@ for sh in "$HOME"/.shrc.d/*.sh ; do
done
unset -v sh
-# If ENV_EXT was set and exists, source that too
+# If ENV_EXT was set and exists, source that too, then clean it away
[ -e "$ENV_EXT" ] && . "$ENV_EXT"
+unset -v ENV_EXT
diff --git a/sh/shrc.d/keychain.sh b/sh/shrc.d/keychain.sh
index d9aaf63f..9a732384 100644
--- a/sh/shrc.d/keychain.sh
+++ b/sh/shrc.d/keychain.sh
@@ -1,4 +1,4 @@
# If GPG_AGENT_INFO is set, update GPG_TTY for clean use of pinentry(1) etc
[ -n "$GPG_AGENT_INFO" ] || return
-GPG_TTY=$(command -p tty)
+GPG_TTY=$(command -p tty) || return
export GPG_TTY