This commit is contained in:
Marc Beninca 2024-11-19 16:15:12 +01:00
parent 8fae0bd63e
commit 07483cdadf
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -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
..() {