The resize client resets three environment variables: TERM, LINES, and COLUMNS. This enables a shell to reflect the current size of its window.
Don't confuse resize, the client, with f.resize the window manager function. The f.resize function changes the size of a window, but does
not reset any environment variables. The resize client, on the other hand, does not change the size of a window, but it does reset the environment variables. Resetting the environment variables enables non-client programs to adjust their output to the window's new size.
Use resize whenever you resize a terminal emulator window and want a non-client program running in that window to reflect the window's new size.
The resize client is typically used as an argument to the HP-UX eval command.
The syntax for resize is as follows:
where options are:
- -c
Resets the environment variables for csh shells.
- -h
Uses Hewlett-Packard terminal escape sequences to determine new window size.
- -s [row col]
Uses Sun escape sequences to determine new window size. New row and column sizes are specified with row and col.
- -u
Resets the environment variables for sh and ksh shells.
- -x
Uses VT102 escape sequences to determine new window size.
To see what the current COLUMN and LINES settings are, type the following command:
After you have resized a window either by dragging the window frame or by choosing the "Size" selection from the window menu, you can reset the LINES, and COLUMN environment variables to reflect the new window size by issuing the following command:
If you find yourself typing the above command too often, you can make things a little easier on yourself. If you use csh, try using an alias. The following line in your .cshrc file enables you to run resize by typing xr.
alias xr 'set noglob; eval `resize`'
|
If you use sh or ksh create an xr function like the following: