wip/works

This commit is contained in:
Marc Beninca 2024-11-16 02:43:06 +01:00
parent 60adeb9f40
commit 62ae8d73cc
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -7,13 +7,13 @@ shell_color() {
local code="${1}"
case "${SH}" in
"bash")
printf "\e[0"
printf "\\e[0"
if [ -n "${code}" ]; then
printf "%s" ";${code}"
fi
;;
*)
printf "\033["
printf "\\033["
if [ -n "${code}" ]; then
printf "%s" "${code}"
else
@ -76,11 +76,13 @@ ps1() {
fi
fi
# new
view="${view}\n"
view="${view}
"
# path
view="${view}${SH_CYAN}${path}"
# new
view="${view}\n"
view="${view}
"
# frame
view="${view}${SH_DEFAULT}"
# user
@ -92,6 +94,12 @@ ps1() {
view="${view}${user}"
# host
view="${view}${SH_DEFAULT} @ "
view="${view}${SH_BROWN}${host}${SH_DEFAULT}"
printf "%s" "${view}\n${PS2}"
view="${view}${SH_BROWN}${host}"
# new
view="${view}
"
# prompt
view="${view}${SH_DEFAULT}${PS2}"
# print
printf "%s" "${view}"
}