shell_configure
This commit is contained in:
parent
cdc976db0b
commit
5ffc9fc840
1 changed files with 5 additions and 6 deletions
11
sh/shell.sh
11
sh/shell.sh
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue