Skip to content
Commit 37438929 authored by Jason Wessel's avatar Jason Wessel Committed by Richard Purdie
Browse files

base-files/profile: Add universal resize function



Using an editor or any kind of command line that wraps beyond the
column width of the session on a serial port is quite problematic
unless you are using an 80x24 session.

The original /etc/profile tried to use the resize binary if it was
available.  The problem is that you only get the resize binary if
xterm, or busybox is installed.

This updated /etc/profile will add a resize function available to the
shell when no xterm or busybox resize binary is found.  More care is
taken in this new version to test that terminal is interactive.  The
EDITOR and SHLVL environment variables are checked to prevent resize
from running necessarily.

The function definitions are not indented intentionally to keep them
to the 80 column width.

Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent ac5e0fd6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment