sh_shell
This commit is contained in:
parent
8fae0bd63e
commit
07483cdadf
1 changed files with 5 additions and 4 deletions
9
sh/sh.sh
9
sh/sh.sh
|
@ -1,11 +1,12 @@
|
|||
PS1="\$(shell_prompt \${?})"
|
||||
PS2="\
|
||||
├ "
|
||||
SH="$(cat /proc/$$/comm)"
|
||||
|
||||
SH_SHELL="$(cat /proc/$$/comm)"
|
||||
|
||||
shell_color() {
|
||||
local code="${1}"
|
||||
case "${SH}" in
|
||||
case "${SH_SHELL}" in
|
||||
"bash")
|
||||
printf "\x01\e[0"
|
||||
if [ -n "${code}" ]; then
|
||||
|
@ -32,7 +33,7 @@ SH_MAGENTA="$(shell_color 35)"
|
|||
SH_RED="$(shell_color 32)"
|
||||
|
||||
shell_configure() {
|
||||
case "${SH}" in
|
||||
case "${SH_SHELL}" in
|
||||
"bash")
|
||||
# completion
|
||||
local root="/usr/share/bash-completion"
|
||||
|
@ -140,7 +141,7 @@ x() {
|
|||
"${@}"
|
||||
}
|
||||
|
||||
[ "${SH}" = "bash" ] || return
|
||||
[ "${SH_SHELL}" = "bash" ] || return
|
||||
|
||||
# shellcheck disable=SC3033
|
||||
..() {
|
||||
|
|
Loading…
Reference in a new issue