瀏覽代碼

shrc: fix second line of prompt

pull/1/head
10sr 10 年之前
父節點
當前提交
8624d71ead
共有 1 個文件被更改,包括 11 次插入15 次删除
  1. +11
    -15
      shrc

+ 11
- 15
shrc 查看文件

@@ -1062,20 +1062,6 @@ ipaddress(){
test -n "$ip" && printf $1 $ip
}

__my_ps1_str=""

test -n "$__MY_SCRIPT" && \
__my_ps1_str=" ${__my_ps1_str}${__my_c5}SCR${__my_cdef}"

test -n "$SSH_CONNECTION" && \
__my_ps1_str=" ${__my_ps1_str}${__my_c5}SSH${__my_cdef}"

if test -n "$__MY_DTACH"
then
__dt_name="`basename "$__MY_DTACH"`"
__my_ps1_str=" ${__my_ps1_str}${__my_c5}DT:${__dt_name}${__my_cdef}"
fi

__my_ps1_scale(){
if null type stty && ! $ismsys
then
@@ -1245,9 +1231,19 @@ __my_ps1_info1(){
echo "${__my_ps1_sh}$(__my_ps1_scale)$(__my_ps1_git)$(__my_ps1_bttry)$(__my_ps1_ipaddr)$(__my_ps1_moc)"
}

test -n "$__MY_SCRIPT" && \
__my_ps1_str_scr="SCR"

test -n "$SSH_CONNECTION" && \
__my_ps1_str_ssh="SSH"

test -n "$__MY_DTACH" && \
__my_ps1_str_dt="DT:`basename "$__MY_DTACH$"`"

__my_ps1_info2(){
# second line of PS1
echo $(__my_ps1_memo) $(__my_ps1_jobs) ${__my_ps1_str} $(__my_alert_fail) \
echo $(__my_ps1_memo) $(__my_ps1_jobs) ${__my_ps1_str_scr} \
${__my_ps1_str_ssh} ${__my_ps1_str_dt} $(__my_alert_fail) \
| sed -e 's/ /|/g'
}



Loading…
取消
儲存