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