sh
This commit is contained in:
parent
6a49f4981a
commit
c68598931b
3 changed files with 7 additions and 1 deletions
|
@ -17,6 +17,9 @@ x() {
|
||||||
"${@}"
|
"${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# shellcheck disable=SC2154
|
||||||
|
[ "${SH}" = "bash" ] || return
|
||||||
|
|
||||||
# back
|
# back
|
||||||
|
|
||||||
# shellcheck disable=SC3033
|
# shellcheck disable=SC3033
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
[ -n "${ENV}" ] || export ENV="/etc/shell/main.sh"
|
[ -n "${ENV}" ] || export ENV="/etc/shell/main.sh"
|
||||||
|
|
||||||
|
SH="$(cat /proc/$$/comm)"
|
||||||
|
export SH
|
||||||
|
|
||||||
main_source_directory() {
|
main_source_directory() {
|
||||||
local path="${1}"
|
local path="${1}"
|
||||||
if [ -d "${path}" ]; then
|
if [ -d "${path}" ]; then
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
PS1="\$(shell_prompt \${?})"
|
PS1="\$(shell_prompt \${?})"
|
||||||
PS2="\
|
PS2="\
|
||||||
├ "
|
├ "
|
||||||
SH="$(cat /proc/$$/comm)"
|
|
||||||
|
|
||||||
shell_color() {
|
shell_color() {
|
||||||
local code="${1}"
|
local code="${1}"
|
||||||
|
# shellcheck disable=SC2154
|
||||||
case "${SH}" in
|
case "${SH}" in
|
||||||
"bash")
|
"bash")
|
||||||
printf "\e[0"
|
printf "\e[0"
|
||||||
|
|
Loading…
Reference in a new issue