diff --git a/bash_it.sh b/bash_it.sh index b8d3aeef..679ffdaf 100755 --- a/bash_it.sh +++ b/bash_it.sh @@ -114,6 +114,7 @@ for _bash_it_config_file in $CUSTOM; do if [ -e "${_bash_it_config_file}" ]; then filename=$(basename "${_bash_it_config_file}") filename=${filename%*.bash} + # shellcheck disable=SC2034 BASH_IT_LOG_PREFIX="custom: $filename: " _log_debug "Loading custom file..." # shellcheck disable=SC1090 @@ -122,7 +123,7 @@ for _bash_it_config_file in $CUSTOM; do done unset _bash_it_config_file -if [[ "${PROMPT:-}" ]]; then +if [[ -n "${PROMPT:-}" ]]; then export PS1="\[""$PROMPT""\]" fi diff --git a/hooks/dot-bash.sh b/hooks/dot-bash.sh index 7a9dc8bc..253cb595 100755 --- a/hooks/dot-bash.sh +++ b/hooks/dot-bash.sh @@ -18,4 +18,4 @@ for file in "$@"; do fi done -exit $exit_code +exit "${exit_code:-0}" diff --git a/hooks/dot-sh.sh b/hooks/dot-sh.sh index 3fa63216..e1086bb6 100755 --- a/hooks/dot-sh.sh +++ b/hooks/dot-sh.sh @@ -18,4 +18,4 @@ for file in "$@"; do fi done -exit $exit_code +exit "${exit_code:-0}" diff --git a/scripts/reloader.bash b/scripts/reloader.bash old mode 100644 new mode 100755 index f22de67e..4bc24941 --- a/scripts/reloader.bash +++ b/scripts/reloader.bash @@ -5,6 +5,7 @@ function _set-prefix-based-on-path() { filename=$(_bash-it-get-component-name-from-path "$1") extension=$(_bash-it-get-component-type-from-path "$1") + # shellcheck disable=SC2034 BASH_IT_LOG_PREFIX="$extension: $filename: " } @@ -15,7 +16,7 @@ if [[ "$1" != "skip" ]] && [[ -d "$BASH_IT/enabled" ]]; then alias|completion|plugin) _bash_it_config_type=$1 _log_debug "Loading enabled $1 components..." ;; - *|'') + ''|*) _log_debug "Loading all enabled components..." ;; esac