From 07483cdadf37bb7c7822fbc21928538168b50490 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 19 Nov 2024 16:15:12 +0100 Subject: [PATCH] sh_shell --- sh/sh.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sh/sh.sh b/sh/sh.sh index 6fab8a6..a1dc2d1 100644 --- a/sh/sh.sh +++ b/sh/sh.sh @@ -1,11 +1,12 @@ PS1="\$(shell_prompt \${?})" PS2="\ ├ " -SH="$(cat /proc/$$/comm)" + +SH_SHELL="$(cat /proc/$$/comm)" shell_color() { local code="${1}" - case "${SH}" in + case "${SH_SHELL}" in "bash") printf "\x01\e[0" if [ -n "${code}" ]; then @@ -32,7 +33,7 @@ SH_MAGENTA="$(shell_color 35)" SH_RED="$(shell_color 32)" shell_configure() { - case "${SH}" in + case "${SH_SHELL}" in "bash") # completion local root="/usr/share/bash-completion" @@ -140,7 +141,7 @@ x() { "${@}" } -[ "${SH}" = "bash" ] || return +[ "${SH_SHELL}" = "bash" ] || return # shellcheck disable=SC3033 ..() {