Igor Schein on Wed, 19 May 2004 19:40:15 +0200

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

readline question


I run gp inside a screen session, and I detach/reattach to the session
from different terminals, varying in size.  Sometimes gp becomes
confused about the width of the window.  For example, right now I have
a session where I can only type 144-long lines before it wraps
around.  However, if I ^Z, the underlying shell shows 264 columns (
which is the width of my current screen ).  Is there a magic readline
command which would make gp session re-learn the terminal size?  I
tried many things, like ^A-F ( screen command ), eval `resize`, reset,
tset etc., nothing works.  My command lines can be 500-characters
long, and editing became a nightmare, but on the other hand I don't
wanna lose 1000+ line history of the current gp session.  

I was also unable to find a readline-native way to save out a command
history to a file.  If such functionality doesn't exists, maybe it
would be doable to add 'history' command for gp?  All modern shells
have a history command, and gp is a shell by definition.