diff options
Diffstat (limited to 'shell/conf')
| -rw-r--r-- | shell/conf | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -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 |
