aboutsummaryrefslogtreecommitdiff
path: root/kshrc
diff options
context:
space:
mode:
Diffstat (limited to 'kshrc')
-rw-r--r--kshrc18
1 files changed, 10 insertions, 8 deletions
diff --git a/kshrc b/kshrc
index 48504f2..78663da 100644
--- a/kshrc
+++ b/kshrc
@@ -131,9 +131,9 @@ mount
umount"
# Only add aliases for commands that actually exist on our system
- if [ -x "$_sudo" ] ; then
+ if [ -n "$_sudo" ] ; then
for _c in $_cmds ; do
- [ -x "$(command -v "$_c")" ] && eval "alias $_c=\"$_sudo $_c\""
+ [ -n "$(command -v "$_c")" ] && eval "alias $_c=\"$_sudo $_c\""
done
fi
case $_sudo in
@@ -490,19 +490,19 @@ pull() {
echo "pull usage: -f <output> -u <url>"; return
fi
- if [ -x "$(command -v wget)" ] ; then
+ if [ -n "$(command -v wget)" ] ; then
wget "$_u" -O "$_f" && return
fi
- if [ -x "$(command -v curl)" ] ; then
+ if [ -n "$(command -v curl)" ] ; then
curl "$_u" -o "$_f" && return
fi
- if [ -x "$(command -v ftp)" ] && [ "$(uname)" = "OpenBSD" ] ; then
+ if [ -n "$(command -v ftp)" ] && [ "$(uname)" = "OpenBSD" ] ; then
ftp -o "$_f" "$_u" && return
fi
- if [ -x "$(command -v fetch)" ] && [ "$(uname)" = "FreeBSD" ] ; then
+ if [ -n "$(command -v fetch)" ] && [ "$(uname)" = "FreeBSD" ] ; then
fetch "$_u" -o "$_f" && return
fi
@@ -638,12 +638,14 @@ setsudoaliases
# Support various different shells
-if [ -n "$KSH_VERSION" ] ; then
+if [ -n "$YASH_VERSION" ] ; then
+ echo "Intentionally left blank" >/dev/null 2>&1
+elif [ -n "$KSH_VERSION" ] ; then
export HISTFILE="$HOME/.ksh_history"
export HISTSIZE=10000
- set -o emacs
bind ^L=clear-screen
+ set -o emacs
#shellcheck disable=SC2155
# if you want PWD