Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. 2014/08/05 10:58:43
  2. [username]machinename:/some/path/here $
  3.  
  4. unset _Y _M _D _h _m _s
  5. eval $(date "+_Y=%Y;_M=%m;_D=%d;_h=%H;_m=%M;_s=%S")
  6. ((SECONDS=3600*${_h#0}+60*${_m#0}+${_s#0}))
  7. typeset -Z2 _h _m _s
  8. _tsub="(_m=(SECONDS/60%60)) == (_h=(SECONDS/3600%24)) + (_s=(SECONDS%60))"
  9. _timehm='${_x[_tsub]}$_h:${_m}'
  10. _timehms='${_x[_tsub]}$_h:$_m:${_s}'
  11. _timedhms=$_Y'/'$_M'/'$_D" "'${_x[_tsub]}$_h:$_m:${_s}'
  12.  
  13. PS1="$_timedhms'n' "'[USERNAME]MACHINE:${PWD#$HOME/} $ '
  14.  
  15. PS1="$_timedhms
  16. > [USERNAME]MACHINE:${PWD#$HOME/} $ "
  17.  
  18. PS1="$_timedhms$'n' [USERNAME]MACHINE:${PWD#$HOME/} $ "
  19.  
  20. export PS1=$(echo "33[01;33m"`date +%D`" "`date +%T`"33[0m""n"`whoami`@"33[3;36m"`hostname`"33[0m"':$PWD'#)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement