aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-02-25 01:20:56 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-02-25 01:20:56 +1300
commit7589660a8ebe4cf29cb07a415e07672a7e1e66fa (patch)
treed5f17010cfdfdb0ba4c1a1a97d017957d2f108e2 /sh
parentMerge branch 'master' into port/bsd/freebsd (diff)
parentAdd basic ex/vi settings (diff)
downloaddotfiles-7589660a8ebe4cf29cb07a415e07672a7e1e66fa.tar.gz
dotfiles-7589660a8ebe4cf29cb07a415e07672a7e1e66fa.zip
Merge branch 'master' into port/bsd/freebsd
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