This commit is contained in:
Marc Beninca 2024-11-17 17:40:02 +01:00
parent 9b05b663da
commit 3d5e4f5a68
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 1 additions and 5 deletions

View file

@ -1,8 +1,5 @@
[ -n "${ENV}" ] || export ENV="/etc/shell/main.sh" [ -n "${ENV}" ] || export ENV="/etc/shell/main.sh"
SH="$(cat /proc/$$/comm)"
export SH
main_source_directory() { main_source_directory() {
local path="${1}" local path="${1}"
if [ -d "${path}" ]; then if [ -d "${path}" ]; then

View file

@ -1,10 +1,10 @@
PS1="\$(shell_prompt \${?})" PS1="\$(shell_prompt \${?})"
PS2="\ PS2="\
" "
SH="$(cat /proc/$$/comm)"
shell_color() { shell_color() {
local code="${1}" local code="${1}"
# shellcheck disable=SC2154
case "${SH}" in case "${SH}" in
"bash") "bash")
printf "\x01\e[0" printf "\x01\e[0"
@ -130,7 +130,6 @@ x() {
"${@}" "${@}"
} }
# shellcheck disable=SC2154
[ "${SH}" = "bash" ] || return [ "${SH}" = "bash" ] || return
# shellcheck disable=SC3033 # shellcheck disable=SC3033