shell_configure

This commit is contained in:
Marc Beninca 2024-11-20 14:39:01 +01:00
parent cdc976db0b
commit 5ffc9fc840
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,7 +1,3 @@
PS1="\$(sh_shell_prompt \${?})"
PS2="\
"
_sh_shell_color() { _sh_shell_color() {
local code="${1}" local code="${1}"
case "${SH_SHELL}" in case "${SH_SHELL}" in
@ -30,7 +26,7 @@ SH_COLOR_GREEN="$(_sh_shell_color 31)"
SH_COLOR_MAGENTA="$(_sh_shell_color 35)" SH_COLOR_MAGENTA="$(_sh_shell_color 35)"
SH_COLOR_RED="$(_sh_shell_color 32)" SH_COLOR_RED="$(_sh_shell_color 32)"
shell_configure() { sh_shell_configure() {
case "${SH_SHELL}" in case "${SH_SHELL}" in
"bash") "bash")
# completion # completion
@ -52,11 +48,14 @@ shell_configure() {
HISTCONTROL="ignorespace" HISTCONTROL="ignorespace"
HISTSIZE=-1 HISTSIZE=-1
HISTTIMEFORMAT="%Y%m%d %H%M%S " HISTTIMEFORMAT="%Y%m%d %H%M%S "
# prompt
PS1="\$(sh_shell_prompt \${?})"
PS2="├ "
;; ;;
*) ;; *) ;;
esac esac
} }
shell_configure sh_shell_configure
sh_shell_prompt() { sh_shell_prompt() {
local date host id local date host id