Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2014/08/05 10:58:43
- [username]machinename:/some/path/here $
- unset _Y _M _D _h _m _s
- eval $(date "+_Y=%Y;_M=%m;_D=%d;_h=%H;_m=%M;_s=%S")
- ((SECONDS=3600*${_h#0}+60*${_m#0}+${_s#0}))
- typeset -Z2 _h _m _s
- _tsub="(_m=(SECONDS/60%60)) == (_h=(SECONDS/3600%24)) + (_s=(SECONDS%60))"
- _timehm='${_x[_tsub]}$_h:${_m}'
- _timehms='${_x[_tsub]}$_h:$_m:${_s}'
- _timedhms=$_Y'/'$_M'/'$_D" "'${_x[_tsub]}$_h:$_m:${_s}'
- PS1="$_timedhms'n' "'[USERNAME]MACHINE:${PWD#$HOME/} $ '
- PS1="$_timedhms
- > [USERNAME]MACHINE:${PWD#$HOME/} $ "
- PS1="$_timedhms$'n' [USERNAME]MACHINE:${PWD#$HOME/} $ "
- export PS1=$(echo "