bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: winch trap delayed until keypress


From: Linda Walsh
Subject: Re: winch trap delayed until keypress
Date: Thu, 22 May 2014 06:02:42 -0700
User-agent: Thunderbird



Pierre Gaston wrote:

    As I understand it, this is now broken in 4.3?:
    ----
    # display new size of terminal when resized
    function showsize () {\
      local s=$(stty size); local o="(${s% *}x${s#* })"; s="${#o}";\
      echo -n $o; while ((s-- > 0));do echo -ne "\b"; done; \
    }

    trap showsize SIGWINCH
    ----

As I understand it, it only affects the interactive behaviour of bash, and doesn't change anything for your use case, the trap will be executed when the foreground command exits.

---
If I wanted to "see" the size interactively, I wouldn't resize it unless
I'm at the command prompt.  I.e. it will be waiting for input.
Each time I move the corner of a tty window it displays the size
at the point of the cursor (where the command prompt is).

This allows me to dynamically see what I'm doing when I resize a window
if I am going for a specific size (which happens usually after I've
expanded it for some reason, and am now trying to size it back down.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]