diff --git a/shell/alias/shell.sh b/shell/alias/shell.sh index d38c3cb..531b4b0 100644 --- a/shell/alias/shell.sh +++ b/shell/alias/shell.sh @@ -17,6 +17,9 @@ x() { "${@}" } +# shellcheck disable=SC2154 +[ "${SH}" = "bash" ] || return + # back # shellcheck disable=SC3033 diff --git a/shell/main.sh b/shell/main.sh index 0ccf86b..226062c 100644 --- a/shell/main.sh +++ b/shell/main.sh @@ -1,5 +1,8 @@ [ -n "${ENV}" ] || export ENV="/etc/shell/main.sh" +SH="$(cat /proc/$$/comm)" +export SH + main_source_directory() { local path="${1}" if [ -d "${path}" ]; then diff --git a/shell/shell.sh b/shell/shell.sh index b50964e..edddde6 100644 --- a/shell/shell.sh +++ b/shell/shell.sh @@ -1,10 +1,10 @@ PS1="\$(shell_prompt \${?})" PS2="\ ├ " -SH="$(cat /proc/$$/comm)" shell_color() { local code="${1}" + # shellcheck disable=SC2154 case "${SH}" in "bash") printf "\e[0"