wip/works
This commit is contained in:
parent
60adeb9f40
commit
62ae8d73cc
1 changed files with 14 additions and 6 deletions
|
@ -7,13 +7,13 @@ shell_color() {
|
||||||
local code="${1}"
|
local code="${1}"
|
||||||
case "${SH}" in
|
case "${SH}" in
|
||||||
"bash")
|
"bash")
|
||||||
printf "\e[0"
|
printf "\\e[0"
|
||||||
if [ -n "${code}" ]; then
|
if [ -n "${code}" ]; then
|
||||||
printf "%s" ";${code}"
|
printf "%s" ";${code}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf "\033["
|
printf "\\033["
|
||||||
if [ -n "${code}" ]; then
|
if [ -n "${code}" ]; then
|
||||||
printf "%s" "${code}"
|
printf "%s" "${code}"
|
||||||
else
|
else
|
||||||
|
@ -76,11 +76,13 @@ ps1() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# new
|
# new
|
||||||
view="${view}\n"
|
view="${view}
|
||||||
|
"
|
||||||
# path
|
# path
|
||||||
view="${view}${SH_CYAN}${path}"
|
view="${view}${SH_CYAN}${path}"
|
||||||
# new
|
# new
|
||||||
view="${view}\n"
|
view="${view}
|
||||||
|
"
|
||||||
# frame
|
# frame
|
||||||
view="${view}${SH_DEFAULT}┌ "
|
view="${view}${SH_DEFAULT}┌ "
|
||||||
# user
|
# user
|
||||||
|
@ -92,6 +94,12 @@ ps1() {
|
||||||
view="${view}${user}"
|
view="${view}${user}"
|
||||||
# host
|
# host
|
||||||
view="${view}${SH_DEFAULT} @ "
|
view="${view}${SH_DEFAULT} @ "
|
||||||
view="${view}${SH_BROWN}${host}${SH_DEFAULT}"
|
view="${view}${SH_BROWN}${host}"
|
||||||
printf "%s" "${view}\n${PS2}"
|
# new
|
||||||
|
view="${view}
|
||||||
|
"
|
||||||
|
# prompt
|
||||||
|
view="${view}${SH_DEFAULT}${PS2}"
|
||||||
|
# print
|
||||||
|
printf "%s" "${view}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue