react on change of terminals window size

suggest change

There is a signal WINCH ( WINdowCHange), which is fired when one resizes a terminal window.

declare -x rows cols
  rows=$(tput lines) # get actual lines of term
  cols=$(tput cols)  # get actual columns of term
  echo DEBUG terminal window has no $rows lines and is $cols characters wide

trap update_size WINCH

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents