# HG changeset patch # User Oleksandr Gavenko # Date 1622674970 -10800 # Node ID e0ffdc132f41a557e194021507839127e47f91d1 # Parent 080abbbb7ba7176cb65a4a6c2b00c52cdbdad130 TERM is missing when run non-interactively through SSH. Disable ruler in non-interacticve session. diff -r 080abbbb7ba7 -r e0ffdc132f41 .bashrc --- a/.bashrc Wed Jun 02 21:46:48 2021 +0300 +++ b/.bashrc Thu Jun 03 02:02:50 2021 +0300 @@ -23,8 +23,12 @@ ruler=${ruler:0:${size}} _my_ruler=$ruler } -_my_ruler_handler -trap '_my_ruler_handler' SIGWINCH +case $- in + *i*) + _my_ruler_handler + trap '_my_ruler_handler' SIGWINCH + ;; +esac PS1='\n${_my_ruler}\r$?|\u@\h \w \nbash# ' PS2='> '