From cee85ee94fbcd38b2cd506f51e4308f81c622247 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Fri, 22 Jan 2021 20:22:08 -0500 Subject: Update the shell configuration a bit --- shell/conf | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'shell/conf') 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 -- cgit v1.2.3