10sr 10 лет назад
Родитель
Сommit
cab14215b6
1 измененных файлов: 10 добавлений и 6 удалений
  1. +10
    -6
      shrc

+ 10
- 6
shrc Просмотреть файл

@@ -1144,8 +1144,7 @@ test -n "$__MY_DTACH" && __my_ps1_str="${__my_ps1_str}${__my_c5}DTACH${__my_cdef
__my_ps1_scale(){ __my_ps1_scale(){
if null type stty && ! ismsys if null type stty && ! ismsys
then then
stty size | tr -d $'\n' | tr " " x
printf " "
echo "[LxC:`stty size | tr -d $'\n' | tr " " x`]"
fi fi
} }


@@ -1193,11 +1192,16 @@ __my_ps1_dirs(){
} }


__my_ps1_jobs(){ __my_ps1_jobs(){
jobs | wc -l
# __my_ps1_jobs <num>
if test "$1" -ne 0
then
echo "<JOBS:$1> "
fi
} }


__my_alert_fail(){ __my_alert_fail(){
test $laststatus -eq 0 || echo '!!! '
test $laststatus -eq 0 || \
echo "<STATUS:${laststatus}> "
} }


# About ansi escape sequences # About ansi escape sequences
@@ -1268,8 +1272,8 @@ then
fi fi


_ps1_bash="\ _ps1_bash="\
${__my_c4}:: ${__my_cdef}[${__my_c2}\u@\H${__my_cdef}:${__my_c1}\w/${__my_cdef}]\$(__my_ps1_git)\$(__my_ps1_bttry)\$(__my_ps1_ipaddr)\$(__my_ps1_moc)\n\
${__my_c4}:: ${__my_cdef}l${SHLVL}n\#j\js\$laststatus $(__my_ps1_scale)\D{%T} ${__my_ps1_str}\$(__my_alert_fail)\$ "
${__my_c4}:: ${__my_cdef}[${__my_c2}\u@\H${__my_cdef}:${__my_c1}\w/${__my_cdef}]\$(__my_ps1_scale)\$(__my_ps1_git)\$(__my_ps1_bttry)\$(__my_ps1_ipaddr)\$(__my_ps1_moc)\n\
${__my_c4}:: ${__my_cdef}\$(__my_ps1_jobs \j)${__my_ps1_str}\$(__my_alert_fail)\$ "
inbash && PS1=$_ps1_bash inbash && PS1=$_ps1_bash
_ps1_zsh="$_ps1_bash" _ps1_zsh="$_ps1_bash"
#inzsh && PS1="$_ps1_zsh" #inzsh && PS1="$_ps1_zsh"


Загрузка…
Отмена
Сохранить