aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bashrc.d/pushd.bash2
-rw-r--r--bash/bashrc.d/vared.bash2
-rw-r--r--ksh/shrc.d/ksh.sh1
3 files changed, 3 insertions, 2 deletions
diff --git a/bash/bashrc.d/pushd.bash b/bash/bashrc.d/pushd.bash
index ec621037..4a6e4be3 100644
--- a/bash/bashrc.d/pushd.bash
+++ b/bash/bashrc.d/pushd.bash
@@ -1,4 +1,4 @@
# Make pushd default to $HOME if no arguments given, much like cd
pushd() {
- builtin pushd "${@:-"$HOME"}"
+ builtin pushd "${@:-"$HOME"}" || return
}
diff --git a/bash/bashrc.d/vared.bash b/bash/bashrc.d/vared.bash
index 9159485b..e024f48a 100644
--- a/bash/bashrc.d/vared.bash
+++ b/bash/bashrc.d/vared.bash
@@ -25,6 +25,6 @@ vared() {
fi
local name
for name ; do
- IFS= read -e -i "${!name}" -p "${prompt:-"$name"=}" -r -- "$name"
+ IFS= read -e -i "${!name}" -p "${prompt:-"$name"=}" -r -- "${name?}"
done
}
diff --git a/ksh/shrc.d/ksh.sh b/ksh/shrc.d/ksh.sh
index b591f37c..cc6eeb32 100644
--- a/ksh/shrc.d/ksh.sh
+++ b/ksh/shrc.d/ksh.sh
@@ -21,6 +21,7 @@ if [ -z "$KSH_VERSION" ] ; then
# Test whether we have content in the .sh.version variable. Suppress errors
# and run it in a subshell to work around parsing error precedence.
+ # shellcheck disable=SC2234
( test -n "${.sh.version}" ) 2>/dev/null || return
# If that peculiarly named variable was set, then that's our KSH_VERSION