<<< Date Index >>>     <<< Thread Index >>>

Re: wrap long lines



On 2006-08-29, Gary Johnson <garyjohn@xxxxxxxxxxxxxxx> wrote:

> OK.  I wrote a helper script, trap_aid:
> 
>     $ cat ~/lib/trap_aid
>     trap "" WINCH; eval $(resize); trap ". ~/lib/trap_aid" WINCH
> 
> and then executed:
> 
>     $ trap ". ~/lib/trap_aid" WINCH
> 
> It seems to work pretty well!  I think I'll change the script to a 
> function, put it all into my ~/.kshrc, and see how it works in 
> practice for a while.

The function didn't work, apparently because of the way traps are 
handled within functions, so my current solution is this, in my 
~/.kshrc:

    resize_on_sigwinch='trap "" WINCH; eval $(resize); trap "eval 
\$resize_on_sigwinch" WINCH'
    eval $resize_on_sigwinch

This is for ksh on SunOS.

Regards,
Gary

-- 
Gary Johnson                               | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx                   | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA