aboutsummaryrefslogtreecommitdiff
path: root/shell/conf
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-01-22 20:22:08 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2021-01-23 11:02:04 -0500
commitcee85ee94fbcd38b2cd506f51e4308f81c622247 (patch)
treee2eebefbba46ab09df1936f7e2eb10d9a2264012 /shell/conf
parent9fb0d9bba9b51096be32c47a92e04c5199bdf3ab (diff)
downloaddotfiles-cee85ee94fbcd38b2cd506f51e4308f81c622247.tar.gz
dotfiles-cee85ee94fbcd38b2cd506f51e4308f81c622247.tar.xz
Update the shell configuration a bit
Diffstat (limited to 'shell/conf')
-rw-r--r--shell/conf25
1 files changed, 14 insertions, 11 deletions
diff --git a/shell/conf b/shell/conf
index dd7e6e2..c6b78a4 100644
--- a/shell/conf
+++ b/shell/conf
@@ -20,8 +20,9 @@ LOCAL="$HOME/${SHELL_CONFIG}.local"
# functions if you do that
# Load pre config
-if [ -e $PRELOAD ] ; then
- . $PRELOAD
+if [ -e "$PRELOAD" ] ; then
+ #shellcheck disable=SC1090
+ . "$PRELOAD"
fi
set_pager
@@ -38,20 +39,22 @@ setsudoaliases
# Nasty conditional for support of many different shells
if
- ! [ -z "$KSH_VERSION" ] ||
- [ $SHELL = "/bin/ksh" ] ||
- [ $SHELL = "/bin/mksh" ] ||
- [ $SHELL = "/usr/bin/mksh" ] ||
- [ $SHELL = "/usr/local/bin/mksh" ]
+ [ -n "$KSH_VERSION" ] ||
+ [ "$SHELL" = "/bin/ksh" ] ||
+ [ "$SHELL" = "/bin/mksh" ] ||
+ [ "$SHELL" = "/usr/bin/mksh" ] ||
+ [ "$SHELL" = "/usr/local/bin/mksh" ]
then
export HISTFILE="$HOME/.ksh_history"
set -o emacs
bind ^L=clear-screen
+ #shellcheck disable=SC2155
export PS1="$(whoami)@$(hostname) \$PWD \$ "
-elif [ $SHELL = "/bin/sh" ] && [ "$(uname)" = "FreeBSD" ] ; then
+elif [ "$SHELL" = "/bin/sh" ] && [ "$(uname)" = "FreeBSD" ] ; then
set -o emacs
+ #shellcheck disable=SC2155
export PS1="$(whoami)"'@\h:\w \$ '
-elif ! [ -z "$BASH" ] ; then
+elif [ -n "$BASH" ] ; then
HISTFILE="$HOME/.bash_history"
HISTSIZE=10000
HISTFILESIZE=10000
@@ -67,6 +70,6 @@ if [ $COLOR -eq 1 ] ; then
fi
# Include local configuration options
-if [ -f $LOCAL ] ; then
- . $LOCAL
+if [ -f "$LOCAL" ] ; then
+ . "$LOCAL"
fi