sttyset or display terminal options |
Command |
stty [
stty sets or reports console mode settings on Windows systems. To set specific modes to off, add a - (dash) before each mode. Specifying a mode without a leading dash sets the mode to on.
displays all current console modes. Each mode is displayed with a leading - (dash) if the mode is currently set to off; otherwise, only the mode name appears.
The
Defines the column width of your console window. This mode is system dependant, and returns an error if you specify a column width that is not supported by your operating system.
Optionally, you can specify a second argument (separated by a comma) that specifies the buffer size for the window. If you specify a column width with a comma but no buffer size, the current buffer size is used. If you specify a comma and a buffer size, but no column width, the current width is used. The following examples show how this can be used:
stty columns 80 sets window and buffer to 80 columns. stty columns 80, sets window to 80 columns without changing buffer. stty columns 80,1000 sets window to 80 columns and buffer to 1000. stty columns ,1000 sets buffer to 1000 column without changing window. stty columns , does nothing, silently.
If you set your window size too large to fit on your screen, it is truncated to a size that fits. If you set the buffer size smaller than the window size, the buffer size is reset to the window size.
Sets both the input and output code pages for the console
window. This is equivalent to specifying both
cp is only valid on Windows NT/2000/XP/2003.
Changes how the console window is displayed. There are four possible settings.
hide hides the console windowmax maximizes the console windowmin minimizes the console windowrestore restores the console window
One use of this mode is in a KornShell script that performs graphical actions (for example a script with dlg commands), and you do not want the console visible while it is running. For example, you could start the shell script with
wstart -m sh.exe script.ksh
to minimize the window upon startup, and then have a stty
Corresponds to the Win32
ENABLE_ECHO_INPUT mode. If
Set the erase character. You can set this character to either the backspace or delete character, by specifying ^H or ^?, respectively.
If you do not specify a character to use as the erase character, the current erase character is displayed.
Does not correspond to any standard Win32 console mode, but
allows hiding and restoring of the console window under Windows Me.
stty
This mode is deprecated and should no longer be used. Use
stty
Sets the input code page for the console window. The
stty
Moves the top left corner of the console window to the screen co-ordinates specified. For example
stty pos 100,300
moves the top left corner to a position 100 pixels in from the left side of your screen and 300 pixels down from the top.
The screen co-ordinates can be negative. That is, you can move the console window past the left side or above the top of the screen. You can also move it as far down or to the right as you like, but be careful, as it is possible to move the console window beyond the visible screen.
Corresponds to the Win32
ENABLE_PROCESSED_INPUT mode. This mode enables process
input, meaning that any ^C is processed by the system as an interrupt
and not passed to the program as input. Also, if
Corresponds to the Win32
ENABLE_LINE_INPUT mode. If
Corresponds to the Win32 ENABLE_MOUSE_INPUT mode. Allows a console program to receive mouse related events.
Sets the output code page for the console window. The
stty
Corresponds to the Win32 ENABLE_PROCESSED_OUTPUT mode. Allows ASCII control sequences and backspace, tab, bell, carriage return, and linefeed to be processed by the system. If this mode is not set, then these special ASCII characters simply appear on the screen as special characters, rather than the appropriate motion (or sound, in the case of the bell character).
Corresponds to the Win32 ENABLE_WRAP_AT_EOL_OUTPUT mode. Allows output to wrap when it passes the rightmost column of the console. If this mode is not set, each line is truncated at the rightmost column of the console.
Define the row height of your console window. This mode is system dependant, and returns an error if you specify a row height that is not supported by your operating system.
Optionally, you can specify a second argument (separated by a comma) that specifies the buffer size for the window. If you specify a row height with a comma but no buffer size, the current buffer size is used. If you specify a comma and a buffer size, but no row height, the current height is used. The following examples show how this can be used:
stty rows 25 sets both window and buffer to 25 rows. stty rows 25, sets window to 25 rows without changing buffer. stty rows 25,1000 sets window to 25 rows and buffer to 1000 rows. stty rows ,1000 sets buffer to 1000 rows without changing window. stty rows , does nothing, silently.
If you set your window size too large to fit on your screen, it is truncated to a size that fits. If you set the buffer size smaller than the window size, the buffer size is reset to the window size.
Turns on all of the above input and output modes, which is
the default (and typical) console mode. Using the stty
Corresponds to the Win32 ENABLE_WINDOW_INPUT mode. Allows a program to read events related to the resizing of a console window.
Turning off console mode bits can be dangerous. For example,
if you do a stty
Certain mode bits are automatically forced to on by
command.com, cmd.exe, and the MKS KornShell (in
Windows Me. Windows NT 4.0. Windows 2000. Windows XP. Windows Server 2003.
The functionality of this command is a subset of the UNIX functionality.
MKS Toolkit for Power Users
MKS Toolkit for System
Administrators
MKS Toolkit for Developers
MKS Toolkit for
Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for
Enterprise Developers
MKS AlertCentre