From 0aa7a87e4a632cd1d7293460e8bf0bef6a689a30 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 7 Jan 2013 17:35:28 +0900 Subject: [PATCH] update PS1 --- bashrc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bashrc b/bashrc index cb2b693..7ce6011 100755 --- a/bashrc +++ b/bashrc @@ -671,7 +671,7 @@ __my_ps1_script(){ } __my_ps1_scale(){ local last=$? - echo "[LC:${LINES}x${COLUMNS}]" + printf "${LINES}x${COLUMNS}" return $last } __my_ps1_tmux(){ @@ -736,9 +736,17 @@ then __my_c5="\[\e[30;47m\]" # color for SCR __my_cdef="\[\e[0m\]" fi + +export _LAST_STATUS=$? +__my_export_last_status(){ + export _LAST_STATUS=$? + echo $_LAST_STATUS + return $_LAST_STATUS +} + _PS1="\ -${__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}l${SHLVL}n\#j\js\$? \D{%T} $(__my_ps1_script)\$ " +${__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\$? $(__my_ps1_scale) \D{%T} $(__my_ps1_script)\$ " PS1=$_PS1 __my_set_title(){