wip/shell_color

This commit is contained in:
Marc Beninca 2024-11-16 01:54:13 +01:00
parent 62a33a5583
commit 347951cbdf
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,5 +1,16 @@
SH="$(cat /proc/$$/comm)" SH="$(cat /proc/$$/comm)"
shell_color() {
local code="${1}"
if [ -n "${code}" ]; then
case "${SH}" in
"bash") printf "\e[0;" ;;
*) printf "\033[" ;;
esac
printf "%s" "${code}m"
fi
}
case "${SH}" in case "${SH}" in
"bash") "bash")
# completion # completion