Terminal Escape Code Zen
Lightning Strikes Twice!
LOL..
3rd Dimension Broken with Bash!
So 3D... it'll hurt you eyes! lol.. Man I am cracking up here. Ha but seriously those really do look 3D for terminal though.. I am actually really impressed. Sweet. Here is the little function I wrote to output that grey marble.
Just a word to the wise, start learning and going over some of these concepts, especially the code used in functions, I will be back in a followup that details actually using this stu.
This function is one of my favorites because it is so fast and useful. Like when designing a 256color prompt.
aa_256 () { local o x=`tput op` y=`printf %$((${COLUMNS}-6))s`; for i in {0..256}; do o=00$i; echo -e ${o:${#o}-3:3} `tputm "setaf $i" "setab $i"`${y// /=}$x; done }
Ya this is actually not very helpful or useful, but there you have it.
tputm () { local a; for a in "$@"; do echo -en "${a}n"; done | tput -S }
Some people call this function the grey bringer of death. Not really.
a256 () { ( x=`tput op` y=`printf %$((${COLUMNS}-6))slocal `; for i in {242..232} 232 232; do echo -en "`tput setaf $i;tput setab $i`${y}${x}`tput op`"; done ) }Fix screen
Helpful Ncurses Programs
Program Name | Description | Example Usage |
---|---|---|
infotocap | convert a terminfo description into a termcap description |
|
tic | the terminfo entry-description compiler |
|
toe | table of (terminfo) entries | toe -a|sort -d |
infocmp | compare or print out terminfo descriptions | infocmp -a -L -1 -T -x |
capconvert | automated conversion from termcap to terminfo |
|
stty | prints or changes terminal characteristics, such as baud rate. |
|
clear | clears the terminal's screen |
|
capconvert | automated conversion from termcap to terminfo |
|
ALWAYS check out my functions!
This function will print out the terminal, show it's colors, etc.. I have some really nice ones in this article that I use for tmux, screen, and that sort of thing.
c () { tput clear; pm "$TERM: [colors:`tput colors`/`tput pairs`]"; RC=`tput op` L1=$(L '=' $(( ${COLUMNS} - 25 ))); for i in `seq ${1:-0} ${2:-16}`; do o=" $i"; echo -e " ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${L1}${RC}"; done }
Standard Capabilities
X.364 and iBCS2
\33c
- RIS - full reset\337
- SC - save cursor\338
- RC - restore cursor\33[r
- RSR - not an X.364 mnemonic\33[m
- SGR0 - not an X.364 mnemonic\33[2J
- ED2 - clear page
Specified by ISO 2022
\33(0
- ISO DEC G0 - enable DEC graphics for G0\33(A
- ISO UK G0 - enable UK chars for G0\33(B
- ISO US G0 - enable US chars for G0\33)0
- ISO DEC G1 - enable DEC graphics for G1\33)A
- ISO UK G1 - enable UK chars for G1\33)B
- ISO US G1 - enable US chars for G1
ISO 2022 charset switching:
- ISO/IEC 2022:1994
- "Character code structure and extension techniques"
- ECMA-035
- code structure
- =00..=1F C0 set of control characters
- =20..=7F G0 set of 94 or 96 graphic characters
- =80..=9F C1 set of control characters "C1 controls"
- =A0..=FF G1 set of 94 or 96 graphic characters
- ... G2 and G3
- registration authority
- ISO/IEC 2375:1985 Procedure for registration of escape sequences
- "ECMA registry"
- ISO-IR registration number
- ftp://dkuug.dk/i18n/iso2375reg.txt
- Internaltional register of coded character sets to be used with escape sequences
- ISO/IEC JTC1/SC2/WG3
- ISO-2022 terminals from Siemens
- recode iso-2022..utf-8 not yet implemented
- CJK charsets
DEC private controls widely supported by emulators
\33=
- DECPAM - application keypad mode\33>
- DECPNM - normal keypad mode\33<
- DECANSI - enter ANSI mode\33[!p
- DECSTR - soft reset\33 F
- S7C1T - 7-bit controls
ECMA modes
ISO 2022
2
- AM - keyboard action mode4
- IRM - insert/replace mode12
- SRM - send/receive mode20
- LNM - linefeed mode
DEC modes
1
- CKM - application cursor keys2
- ANM - set VT52 mode3
- COLM - 132-column mode4
- SCLM - smooth scroll5
- SCNM - reverse video mode6
- OM - origin mode7
- AWM - wraparound mode8
- ARM - auto-repeat mode
ECMA attribute sequences
- 0 -
NORMAL
- normal - 1 -
+BOLD
- bold on - 2 -
+DIM
- dim on - 3 -
+ITALIC
- italic on - 4 -
+UNDERLINE
- underline on - 5 -
+BLINK
- blink on - 6 -
+FASTBLINK
- fastblink on - 7 -
+REVERSE
- reverse on - 8 -
+INVISIBLE
- invisible on - 9 -
+DELETED
- deleted on - 10 -
MAIN-FONT
- select primary font - 11 -
ALT-FONT-1
- select alternate font 1 - 12 -
ALT-FONT-2
- select alternate font 2 - 13 -
ALT-FONT-3
- select alternate font 3 - 14 -
ALT-FONT-4
- select alternate font 4 - 15 -
ALT-FONT-5
- select alternate font 5 - 16 -
ALT-FONT-6
- select alternate font 6 - 17 -
ALT-FONT-7
- select alternate font 7 - 18 -
ALT-FONT-1
- select alternate font 1 - 19 -
ALT-FONT-1
- select alternate font 1 - 20 -
FRAKTUR
- Fraktur font - 21 -
DOUBLEUNDER
- double underline - 22 -
-DIM
- dim off - 23 -
-ITALIC
- italic off - 24 -
-UNDERLINE
- underline off - 25 -
-BLINK
- blink off - 26 -
-FASTBLINK
- fastblink off - 27 -
-REVERSE
- reverse off - 28 -
-INVISIBLE
- invisible off - 29 -
-DELETED
- deleted off
Init strings
Name | Description |
---|---|
is1 | init_1string |
is2 | init_2string |
is3 | init_3string |
rs1 | reset_1string |
rs2 | reset_2string |
rs3 | reset_3string |
smcup | enter_ca_mode |
rmcup | exit_ca_mode |
Cap strings
Name | Description |
---|---|
so | String of commands to enter standout mode. |
se | String of commands to leave standout mode. |
sg | Numeric capability, the width on the screen of the magic cookie. This capability is absent in terminals that record appearance modes character by character. |
ms | Flag whose presence means that it is safe to move the cursor while the appearance modes are not in the normal state. If this flag is absent, programs should always reset the appearance modes to normal before moving the cursor. |
xs | Flag whose presence means that the only way to reset appearance modes already on the screen is to clear to end of line. On a per-character terminal, you must clear the area where the modes are set. On a magic cookie terminal, you must clear an area containing the cookie. See the discussion above. |
xt | Flag whose presence means that the cursor cannot be positioned right in front of a magic cookie, and that seis a command to delete the next magic cookie following the cursor. See discussion above. |
mb | String of commands to enter blinking mode. |
md | String of commands to enter double-bright mode. |
mh | String of commands to enter half-bright mode. |
mk | String of commands to enter invisible mode. |
mp | String of commands to enter protected mode. |
mr | String of commands to enter reverse-video mode. |
me | String of commands to turn off all appearance modes, including standout mode and underline mode. On some terminals it also turns off alternate character set mode; on others, it may not. This capability must be present if any of mb... mris present. |
as | String of commands to turn on alternate character set mode. This mode assigns some or all graphic characters an alternate picture on the screen. There is no standard as to what the alternate pictures look like. |
ae | String of commands to turn off alternate character set mode. |
sa | String of commands to turn on an arbitrary combination of appearance modes. It accepts 9 parameters, each of which controls a particular kind of appearance mode. A parameter should be 1 to turn its appearance mode on, or zero to turn that mode off. Most terminals do not support the sacapability, even among those that do have various appearance modes. The nine parameters are, in order,
|
Variable and Function Index
For stty
BC
: tgotoospeed
: Output PaddingPC
: Output Paddingtgetent
: Findtgetflag
: Interrogatetgetnum
: Interrogatetgetstr
: Interrogatetgoto
: tgototparam
: tparamtputs
: Output PaddingUP
: tgoto
Summary of Capability Names
Here are all the terminal capability names in alphabetical order with a brief description of each. For cross references to their definitions, see the index of capability names.
Name | Description |
---|---|
ae | String to turn off alternate character set mode. |
al | String to insert a blank line before the cursor. |
AL | String to insert n blank lines before the cursor. |
am | Flag: output to last column wraps cursor to next line. |
as | String to turn on alternate character set mode.like. |
bc | Very obsolete alternative name for the lecapability. |
bl | String to sound the bell. |
bs | Obsolete flag: ASCII backspace may be used for leftward motion. |
bt | String to move the cursor left to the previous hardware tab stop column. |
bw | Flag: leat left margin wraps to end of previous line. |
CC | String to change terminal's command character. |
cd | String to clear the line the cursor is on, and following lines. |
ce | String to clear from the cursor to the end of the line. |
ch | String to position the cursor at column c in the same line. |
cl | String to clear the entire screen and put cursor at upper left corner. |
cm | String to position the cursor at line l, column c. |
CM | String to position the cursor at line l, column c, relative to display memory. |
co | Number: width of the screen. |
cr | String to move cursor sideways to left margin. |
cs | String to set the scroll region. |
cS | Alternate form of string to set the scroll region. |
ct | String to clear all tab stops. |
cv | String to position the cursor at line l in the same column. |
da | Flag: data scrolled off top of screen may be scrolled back. |
db | Flag: data scrolled off bottom of screen may be scrolled back. |
dB | Obsolete number: msec of padding needed for the backspace character. |
dc | String to delete one character position at the cursor. |
dC | Obsolete number: msec of padding needed for the carriage-return character. |
DC | String to delete n characters starting at the cursor. |
dF | Obsolete number: msec of padding needed for the formfeed character. |
dl | String to delete the line the cursor is on. |
DL | String to delete n lines starting with the cursor's line. |
dm | String to enter delete mode. |
dN | Obsolete number: msec of padding needed for the newline character. |
do | String to move the cursor vertically down one line. |
DO | String to move cursor vertically down n lines. |
ds | String to disable the display of the status line. |
dT | Obsolete number: msec of padding needed for the tab character. |
ec | String of commands to clear n characters at cursor. |
ed | String to exit delete mode. |
ei | String to leave insert mode. |
eo | Flag: output of a space can erase an overstrike. |
es | Flag: other display commands work while writing the status line. |
ff | String to advance to the next page, for a hardcopy terminal. |
fs | String to move the cursor back from the status line to its previous position (outside the status line). |
gn | Flag: this terminal type is generic, not real. |
hc | Flag: hardcopy terminal. |
hd | String to move the cursor down half a line. |
ho | String to position cursor at upper left corner. |
hs | Flag: the terminal has a status line. |
hu | String to move the cursor up half a line. |
hz | Flag: terminal cannot accept ~as output. |
i1 | String to initialize the terminal for each login session. |
i3 | String to initialize the terminal for each login session. |
ic | String to insert one character position at the cursor. |
IC | String to insert n character positions at the cursor. |
if | String naming a file of commands to initialize the terminal. |
im | String to enter insert mode. |
in | Flag: outputting a space is different from moving over empty positions. |
ip | String to output following an inserted character in insert mode. |
is | String to initialize the terminal for each login session. |
it | Number: initial spacing between hardware tab stop columns. |
k0 | String of input sent by function key 0 or 10. |
k1 ... k9 | Strings of input sent by function keys 1 through 9. |
K1 ... K5 | Strings sent by the five other keys in 3-by-3 array with arrows. |
ka | String of input sent by the “clear all tabs” key. |
kA | String of input sent by the “insert line” key. |
kb | String of input sent by the “backspace” key. |
kC | String of input sent by the “clear screen” key. |
kd | String of input sent by typing the down-arrow key. |
kD | String of input sent by the “delete character” key. |
ke | String to make the function keys work locally. |
kE | String of input sent by the “clear to end of line” key. |
kF | String of input sent by the “scroll forward” key. |
kh | String of input sent by typing the “home-position” key. |
kH | String of input sent by the “home down” key. |
kI | String of input sent by the “insert character” or “enter insert mode” key. |
kl | String of input sent by typing the left-arrow key. |
kL | String of input sent by the “delete line” key. |
km | Flag: the terminal has a Meta key. |
kM | String of input sent by the “exit insert mode” key. |
kn | Numeric value, the number of numbered function keys. |
kN | String of input sent by the “next page” key. |
ko | Very obsolete string listing the terminal's named function keys. |
kP | String of input sent by the “previous page” key. |
kr | String of input sent by typing the right-arrow key. |
kR | String of input sent by the “scroll reverse” key. |
ks | String to make the function keys transmit. |
kS | String of input sent by the “clear to end of screen” key. |
kt | String of input sent by the “clear tab stop this column” key. |
kT | String of input sent by the “set tab stop in this column” key. |
ku | String of input sent by typing the up-arrow key. |
l0 | String on keyboard labelling function key 0 or 10. |
l1 ... l9 | Strings on keyboard labelling function keys 1 through 9. |
le | String to move the cursor left one column. |
LE | String to move cursor left n columns. |
li | Number: height of the screen. |
ll | String to position cursor at lower left corner. |
lm | Number: lines of display memory. |
LP | Flag: writing to last column of last line will not scroll. |
mb | String to enter blinking mode. |
md | String to enter double-bright mode. |
me | String to turn off all appearance modes |
mh | String to enter half-bright mode. |
mi | Flag: cursor motion in insert mode is safe. |
mk | String to enter invisible mode. |
mm | String to enable the functioning of the Meta key. |
mo | String to disable the functioning of the Meta key. |
mp | String to enter protected mode. |
mr | String to enter reverse-video mode. |
ms | Flag: cursor motion in standout mode is safe. |
nc | Obsolete flag: do not use ASCII carriage-return on this terminal. |
nd | String to move the cursor right one column. |
NF | Flag: do not use XON/XOFF flow control. |
nl | Obsolete alternative name for the doand sfcapabilities. |
ns | Flag: the terminal does not normally scroll for sequential output. |
nw | String to move to start of next line, possibly clearing rest of old line. |
os | Flag: terminal can overstrike. |
pb | Number: the lowest baud rate at which padding is actually needed. |
pc | String containing character for padding. |
pf | String to terminate redirection of output to the printer. |
po | String to redirect further output to the printer. |
pO | String to redirect n characters ofoutput to the printer. |
ps | String to print the screen on the attached printer. |
rc | String to move to last saved cursor position. |
RI | String to move cursor right n columns. |
rp | String to output character c repeated n times. |
rs | String to reset the terminal from any strange modes. |
sa | String to turn on an arbitrary combination of appearance modes. |
sc | String to save the current cursor position. |
se | String to leave standout mode. |
sf | String to scroll the screen one line up. |
SF | String to scroll the screen n lines up. |
sg | Number: width of magic standout cookie. Absent if magic cookies are not used. |
so | String to enter standout mode. |
sr | String to scroll the screen one line down. |
SR | String to scroll the screen n line down. |
st | String to set tab stop at current cursor column on all lines. programs. |
ta | String to move the cursor right to the next hardware tab stop column. |
te | String to return terminal to settings for sequential output. |
ti | String to initialize terminal for random cursor motion. |
ts | String to move the terminal cursor into the status line. |
uc | String to underline one character and move cursor right. |
ue | String to turn off underline mode |
ug | Number: width of underlining magic cookie. Absent if underlining doesn't use magic cookies. |
ul | Flag: underline by overstriking with an underscore. |
up | String to move the cursor vertically up one line. |
UP | String to move cursor vertically up n lines. |
us | String to turn on underline mode |
vb | String to make the screen flash. |
ve | String to return the cursor to normal. |
vi | String to make the cursor invisible. |
vs | String to enhance the cursor. |
wi | String to set the terminal output screen window. |
ws | Number: the width of the status line. |
xb | Flag: superbee terminal. |
xn | Flag: cursor wraps in a strange way. |
xs | Flag: clearing a line is the only way to clear the appearance modes of positions in that line (or, only way to remove magic cookies on that line). |
xt | Flag: Teleray 1061; several strange characteristics. |
Variable and Function Index
BC
: tgotoospeed
: Output PaddingPC
: Output Paddingtgetent
: Findtgetflag
: Interrogatetgetnum
: Interrogatetgetstr
: Interrogatetgoto
: tgototparam
: tparamtputs
: Output PaddingUP
: tgoto
ae
: StandoutAL
: Insdel Lineal
: Insdel Lineam
: Wrappingas
: Standoutbc
: Cursor Motionbl
: Bellbs
: Cursor Motionbt
: Cursor Motionbw
: Cursor MotionCC
: Basiccd
: Clearingce
: Clearingch
: Cursor Motioncl
: ClearingCM
: Cursor Motioncm
: Cursor Motionco
: Screen Sizecr
: Cursor MotioncS
: Scrollingcs
: Scrollingct
: Initializationcv
: Cursor Motionda
: ScrollingdB
: Pad Specsdb
: ScrollingdC
: Pad SpecsDC
: Insdel Chardc
: Insdel ChardF
: Pad SpecsDL
: Insdel Linedl
: Insdel Linedm
: Insdel ChardN
: Pad SpecsDO
: Cursor Motiondo
: Cursor Motionds
: Status LinedT
: Pad Specsec
: Clearinged
: Insdel Charei
: Insdel Chareo
: Basices
: Status Lineff
: Cursor Motionfs
: Status Linegn
: Basichc
: Basichd
: Half-Lineho
: Cursor Motionhs
: Status Linehu
: Half-Linehz
: Basici1
: Initializationi3
: InitializationIC
: Insdel Charic
: Insdel Charif
: Initializationim
: Insdel Charin
: Insdel Charip
: Insdel Charis
: Initializationit
: InitializationK1...K5
: Keypadk1...k9
: KeypadkA...kT
: Keypadka...ku
: Keypadkm
: Meta Keyl0...l9
: KeypadLE
: Cursor Motionle
: Cursor Motionli
: Screen Sizell
: Cursor Motionlm
: ScrollingLP
: Wrappingmb
: Standoutmd
: Standoutme
: Standoutmh
: Standoutmi
: Insdel Charmk
: Standoutmm
: Meta Keymo
: Meta Keymp
: Standoutmr
: Standoutms
: Underliningms
: Standoutnc
: Cursor Motionnd
: Cursor MotionNF
: Initializationnl
: Cursor Motionns
: Scrollingnw
: Cursor Motionos
: Basicpb
: Pad Specspc
: Pad Specspf
: PrinterpO
: Printerpo
: Printerps
: Printerrc
: Cursor MotionRI
: Cursor Motionrp
: Basicrs
: Initializationsa
: Standoutsc
: Cursor Motionse
: StandoutSF
: Scrollingsf
: Scrollingsg
: Standoutso
: StandoutSR
: Scrollingsr
: Scrollingst
: Initializationta
: Cursor Motionte
: Initializationti
: Initializationts
: Status Lineuc
: Underliningue
: Underliningug
: Underliningul
: UnderliningUP
: Cursor Motionup
: Cursor Motionus
: Underliningvb
: Bellve
: Cursor Visibilityvi
: Cursor Visibilityvs
: Cursor Visibilitywi
: Windowsws
: Status Linexb
: Basicxn
: Wrappingxs
: Standoutxt
: Standoutxt
: Cursor Motion
- Basic: Basic characteristics.
- Screen Size: Screen size, and what happens when it changes.
- Cursor Motion: Various ways to move the cursor.
- Wrapping: What happens if you write a character in the last column.
- Scrolling: Pushing text up and down on the screen.
- Windows: Limiting the part of the window that output affects.
- Clearing: Erasing one or many lines.
- Insdel Line: Making new blank lines in mid-screen; deleting lines.
- Insdel Char: Inserting and deleting characters within a line.
- Standout: Highlighting some of the text.
- Underlining: Underlining some of the text.
- Cursor Visibility: Making the cursor more or less easy to spot.
- Bell: Attracts user's attention; not localized on the screen.
- Keypad: Recognizing when function keys or arrows are typed.
- Meta Key: META acts like an extra shift key.
- Initialization: Commands used to initialize or reset the terminal.
- Pad Specs: Info for the kernel on how much padding is needed.
- Status Line: A status line displays
background
information. - Half-Line: Moving by half-lines, for superscripts and subscripts.
- Printer: Controlling auxiliary printers of display terminals.
Translated Term Capabilities
This is helpful so you can understand what a term cap does, by looking at the long name.
Tput Name | Terminfo Long Name |
---|---|
@7 | key_end |
AB | set_a_background |
AF | set_a_foreground |
AL | parm_insert_line |
AX | AX |
Co | max_colors |
DC | parm_dch |
DL | parm_delete_line |
DO | parm_down_cursor |
E0 | E0 |
F1 | key_f11 |
F2 | key_f12 |
G0 | G0 |
HC | 5i |
IC | parm_ich |
Ic | initialize_color |
Km | delete_line |
LE | parm_left_cursor |
NC | no_color_video |
ND | MT |
NP | NL |
RI | parm_right_cursor |
S0 | S0 |
UP | parm_up_cursor |
YA | NR |
YC | YB |
YE | YD |
YG | YF |
ac | acs_chars |
ae | exit_alt_charset_mode |
al | insert_line |
am | auto_right_margin |
as | enter_alt_charset_mode |
back_color_erase | backspaces_with_bs |
bl | bell |
bs | eat_newline_glitch |
bt | back_tab |
bw | auto_left_margin |
cb | clr_bol |
cc | can_change |
cd | clr_eos |
ce | clr_eol |
cl | clear_screen |
cm | cursor_address |
co | columns |
col_addr_glitch | ceol_standout_glitch |
cpi_changes_res | cr_cancels_micro_mode |
cr | carriage_return |
cs | change_scroll_region |
ct | clear_all_tabs |
cursor_up | scroll_reverse |
da | crt_no_scrolling |
db | dest_tabs_magic_smso |
dc | delete_character |
dl | key_mouse |
do | cursor_down |
eA | ena_acs |
ei | exit_insert_mode |
eo | erase_overstrike |
es | generic_type |
gn | gnu_has_meta_key |
hard_copy | hard_cursor |
has_meta_key | has_hardware_tabs |
has_status_line | has_print_wheel |
hl | hc |
ho | cursor_home |
hs | hue_lightness_saturation |
im | enter_insert_mode |
in | hz |
insert_null_glitch | linefeed_is_newline |
is | init_2string |
it | init_tabs |
k1 | key_f1 |
k2 | key_f2 |
k3 | key_f3 |
k4 | key_f4 |
k5 | key_f5 |
k6 | key_f6 |
k7 | key_f7 |
k8 | key_f8 |
k9 | key_f9 |
k; | key_f10 |
kB | key_btab |
kD | key_dc |
kI | key_ic |
kN | key_npage |
kP | key_ppage |
kb | cursor_left |
kd | key_down |
ke | keypad_local |
kh | key_home |
kl | key_left |
kr | key_right |
ks | keypad_xmit |
ku | key_up |
le | key_backspace |
li | lines |
mb | enter_blink_mode |
md | enter_bold_mode |
me | exit_attribute_mode |
memory_above | lpi_changes_res |
mi | km |
move_insert_mode | move_standout_mode |
mr | enter_reverse_mode |
nc | memory_below |
nd | cursor_right |
needs_xon_xoff | no_correctly_working_cr |
no_pad_char | no_esc_ctlc |
non_rev_rmcup | non_dest_scroll_region |
nw | newline |
nx | ns |
op | orig_pair |
os | over_strike |
pa | max_pairs |
prtr_silent | return_does_clr_eol |
pt | ms |
r2 | reset_2string |
rc | restore_cursor |
row_addr_glitch | semi_auto_right_margin |
sa | set_attributes |
sc | save_cursor |
se | exit_standout_mode |
sf | scroll_forward |
so | enter_standout_mode |
st | set_tab |
ta | tab |
te | exit_ca_mode |
ti | enter_ca_mode |
tilde_glitch | status_line_esc_ok |
ue | exit_underline_mode |
ul | transparent_underline |
up | sr |
us | enter_underline_mode |
vb | flash_screen |
ve | cursor_normal |
vi | cursor_invisible |
vs | cursor_visible |
xn | ut |
xo | xb |
xr | xon_xoff |
xt | xs |
List of All Terminals
You can view this list with the following command:
$ toe -a|sort -d
VT100 keypad Diagram
Here's a diagram of the VT100 keypad keys with their bindings. The top line is the name of the key (some DEC keyboards have the keys labelled somewhat differently, like GOLD instead of PF1, but this is the most "official" name). The second line is the escape sequence it generates in Application Keypad mode (where "$" means the ESC character). The third line contains two items, first the mapping of the key in terminfo, and then in termcap.
_______________________________________ | PF1 | PF2 | PF3 | PF4 | | $OP | $OQ | $OR | $OS | |_kf1__k1_|_kf2__k2_|_kf3__k3_|_kf4__k4_| | 7 8 9 - | | $Ow | $Ox | $Oy | $Om | |_kf9__k9_|_kf10_k;_|_kf0__k0_|_________| | 4 | 5 | 6 | , | | $Ot | $Ou | $Ov | $Ol | |_kf5__k5_|_kf6__k6_|_kf7__k7_|_kf8__k8_| | 1 | 2 | 3 | | | $Oq | $Or | $Os | enter | |_ka1__K1_|_kb2__K2_|_ka3__K3_| $OM | | 0 | . | | | $Op | $On | | |___kc1_______K4____|_kc3__K5_|_kent_@8_|
A better adaptation to modern keyboards such as the PC's, which have a dozen function keys and the keypad 2,4,6,8 keys are labeled with arrows keys, is to use the 5-key arrangement to model the arrow keys as suggested in the terminfo guidelines:
_______________________________________ | PF1 | PF2 | PF3 | PF4 | | $OP | $OQ | $OR | $OS | |_kf1__k1_|_kf2__k2_|_kf3__k3_|_kf4__k4_| | 7 8 9 - | | $Ow | $Ox | $Oy | $Om | |_ka1__K1_|_________|_ka3__K3_|_________| | 4 | 5 | 6 | , | | $Ot | $Ou | $Ov | $Ol | |_________|_kb2__K2_|_________|_________| | 1 | 2 | 3 | | | $Oq | $Or | $Os | enter | |_kc1__K4_|_________|_kc3__K5_| $OM | | 0 | . | | | $Op | $On | | |___________________|_________|_kent_@8_|
SGR parameter values
Name | Description |
---|---|
0 | default mode (attributes off) |
1 | bold |
2 | dim |
3 | italicized |
4 | underlined |
5 | slow blink |
6 | fast blink |
7 | reverse video |
8 | invisible |
9 | crossed-out (marked for deletion) |
10 | primary font [10 + n (n in 1..9) = nth alternative font] |
20 | Fraktur |
21 | double underline |
22 | turn off 2 |
23 | turn off 3 |
24 | turn off 4 |
25 | turn off 5 |
26 | proportional spacing |
27 | turn off 7 |
28 | turn off 8 |
29 | turn off 9 |
30 | black fg |
31 | red fg |
32 | green fg |
33 | yellow fg |
34 | blue fg |
35 | magenta fg |
36 | cyan fg |
37 | white fg |
38 | set fg color as in CCIT T.416 |
39 | set default fg color |
40 | black bg |
41 | red bg |
42 | green bg |
43 | yellow bg |
44 | blue bg |
45 | magenta bg |
46 | cyan bg |
47 | white bg |
48 | set bg color as in CCIT T.416 |
39 | set default bg color |
50 | turn off 26 |
51 | framed |
52 | encircled |
53 | overlined |
54 | turn off 51 & 52 |
55 | not overlined |
56-59 | reserved |
61-65 | variable highlights for ideograms. |
Sequence Sequence Parameter or Mnemonic Name Sequence Value Mode terminfo ----------------------------------------------------------------------------- APC Applicatn Program Command E _ - Delim - BEL Bell * ^G - - bel BPH Break Permitted Here * E B - * - BS Backpace * ^H - EF - CAN Cancel * ^X - - - (A) CBT Cursor Backward Tab E [ Pn Z 1 eF cbt CCH Cancel Previous Character E T - - - CHA Cursor Horizntal Absolute E [ Pn G 1 eF hpa (B) CHT Cursor Horizontal Tab E [ Pn I 1 eF tab (C) CMD Coding Method Delimiter * E CNL Cursor Next Line E [ Pn E 1 eF nel (D) CPL Cursor Preceding Line E [ Pn F 1 eF - CPR Cursor Position Report E [ Pn ; Pn R 1, 1 - - (E) CSI Control Sequence Intro E [ - Intro - CTC Cursor Tabulation Control E [ Ps W 0 eF - (F) CUB Cursor Backward E [ Pn D 1 eF cub CUD Cursor Down E [ Pn B 1 eF cud CUF Cursor Forward E [ Pn C 1 eF cuf CUP Cursor Position E [ Pn ; Pn H 1, 1 eF cup (G) CUU Cursor Up E [ Pn A 1 eF cuu CVT Cursor Vertical Tab E [ Pn Y - eF - (H) DA Device Attributes E [ Pn c 0 - - DAQ Define Area Qualification E [ Ps o 0 - - DCH Delete Character E [ Pn P 1 eF dch DCS Device Control String E P - Delim - DL Delete Line E [ Pn M 1 eF dl DLE Data Link Escape * ^P - - - DMI Disable Manual Input E - Fs - DSR Device Status Report E [ Ps n 0 - - (I) DTA Dimension Text Area * E [ Pn ; Pn SPC T - PC - EA Erase in Area E [ Ps O 0 eF - (J) ECH Erase Character E [ Pn X 1 eF ech ED Erase in Display E [ Ps J 0 eF ed (J) EF Erase in Field E [ Ps N 0 eF - EL Erase in Line E [ Ps K 0 eF el (J) EM End of Medium * ^Y - - - EMI Enable Manual Input E b Fs - ENQ Enquire ^E - - - EOT End Of Transmission ^D - * - EPA End of Protected Area E W - - - (K) ESA End of Selected Area E G - - - ESC Escape ^[ - - - ETB End Transmission Block ^W - - - ETX End of Text ^C - - - FF Form Feed ^L - - - FNK Function Key * E [ Pn SPC W - - - GCC Graphic Char Combination* E [ Pn ; Pn SPC B - - - FNT Font Selection E [ Pn ; Pn SPC D 0, 0 FE - GSM Graphic Size Modify E [ Pn ; Pn SPC B 100, 100 FE - (L) GSS Graphic Size Selection E [ Pn SPC C none FE - HPA Horz Position Absolute E [ Pn ` 1 FE - (B) HPB Char Position Backward E [ j 1 FE - HPR Horz Position Relative E [ Pn a 1 FE - (M) HT Horizontal Tab * ^I - FE - (N) HTJ Horz Tab w/Justification E I - FE - HTS Horizontal Tab Set E H - FE hts HVP Horz & Vertical Position E [ Pn ; Pn f 1, 1 FE - (G) ICH Insert Character E [ Pn @ 1 eF ich IDCS ID Device Control String E [ SPC O - * - IGS ID Graphic Subrepertoire E [ SPC M - * - IL Insert Line E [ Pn L 1 eF il IND Index E D - FE - INT Interrupt E a - Fs - JFY Justify E [ Ps SPC F 0 FE - IS1 Info Separator #1 * ^_ - * - IS2 Info Separator #1 * ^^ - * - IS3 Info Separator #1 * ^] - * - IS4 Info Separator #1 * ^ - * - LF Line Feed ^J - - - LS1R Locking Shift Right 1 * E ~ - - - LS2 Locking Shift 2 * E n - - - LS2R Locking Shift Right 2 * E } - - - LS3 Locking Shift 3 * E o - - - LS3R Locking Shift Right 3 * E | - - - MC Media Copy E [ Ps i 0 - - (S) MW Message Waiting E U - - - NAK Negative Acknowledge * ^U - * - NBH No Break Here * E C - - - NEL Next Line E E - FE nel (D) NP Next Page E [ Pn U 1 eF - NUL Null * ^@ - - - OSC Operating System Command E ] - Delim - PEC Pres. Expand/Contract * E Pn SPC Z 0 - - PFS Page Format Selection * E Pn SPC J 0 - - PLD Partial Line Down E K - FE - (T) PLU Partial Line Up E L - FE - (U) PM Privacy Message E ^ - Delim - PP Preceding Page E [ Pn V 1 eF - PPA Page Position Absolute * E [ Pn SPC P 1 FE - PPB Page Position Backward * E [ Pn SPC R 1 FE - PPR Page Position Forward * E [ Pn SPC Q 1 FE - PTX Parallel Texts * E [ - - - PU1 Private Use 1 E Q - - - PU2 Private Use 2 E R - - - QUAD Typographic Quadding E [ Ps SPC H 0 FE - REP Repeat Char or Control E [ Pn b 1 - rep RI Reverse Index E M - FE - (V) RIS Reset to Initial State E c - Fs - RM Reset Mode * E [ Ps l - - - (W) SACS Set Add. Char. Sep. * E [ Pn SPC / 0 - - SAPV Sel. Alt. Present. Var. * E [ Ps SPC ] 0 - - (X) SCI Single-Char Introducer E Z - - - SCO Sel. Char. Orientation * E [ Pn ; Pn SPC k - - - SCS Set Char. Spacing * E [ Pn SPC g - - - SD Scroll Down E [ Pn T 1 eF rin SDS Start Directed String * E [ Pn ] 1 - - SEE Select Editing Extent E [ Ps Q 0 - - (Y) SEF Sheet Eject & Feed * E [ Ps ; Ps SPC Y 0,0 - - SGR Select Graphic Rendition E [ Ps m 0 FE sgr (O) SHS Select Char. Spacing * E [ Ps SPC K 0 - - SI Shift In ^O - - - (P) SIMD Sel. Imp. Move Direct. * E [ Ps ^ - - - SL Scroll Left E [ Pn SPC @ 1 eF - SLH Set Line Home * E [ Pn SPC U - - - SLL Set Line Limit * E [ Pn SPC V - - - SLS Set Line Spacing * E [ Pn SPC h - - - SM Select Mode E [ Ps h none - - (W) SO Shift Out ^N - - - (Q) SOH Start Of Heading * ^A - - - SOS Start of String * E X - - - SPA Start of Protected Area E V - - - (Z) SPD Select Pres. Direction * E [ Ps ; Ps SPC S 0,0 - - SPH Set Page Home * E [ Ps SPC G - - - SPI Spacing Increment E [ Pn ; Pn SPC G none FE - SPL Set Page Limit * E [ Ps SPC j - - - SPQR Set Pr. Qual. & Rapid. * E [ Ps SPC X 0 - - SR Scroll Right E [ Pn SPC A 1 eF - SRCS Set Reduced Char. Sep. * E [ Pn SPC f 0 - - SRS Start Reversed String * E [ Ps [ 0 - - SSA Start of Selected Area E F - - - SSU Select Size Unit * E [ Pn SPC I 0 - - SSW Set Space Width * E [ Pn SPC [ none - - SS2 Single Shift 2 (G2 set) E N - Intro - SS3 Single Shift 3 (G3 set) E O - Intro - ST String Terminator E - Delim - STAB Selective Tabulation * E [ Pn SPC ^ - - - STS Set Transmit State E S - - - STX Start pf Text * ^B - - - SU Scroll Up E [ Pn S 1 eF indn SUB Substitute * ^Z - - - SVS Select Line Spacing * E [ Pn SPC 1 - - SYN Synchronous Idle * ^F - - - TAC Tabul. Aligned Centered * E [ Pn SPC b - - - TALE Tabul. Al. Leading Edge * E [ Pn SPC a - - - TATE Tabul. Al. Trailing Edge* E [ Pn SPC ` - - - TBC Tab Clear E [ Ps g 0 FE tbc TCC Tabul. Centered on Char * E [ Pn SPC c - - - TSR Tabulation Stop Remove * E [ Pn SPC d - FE - TSS Thin Space Specification E [ Pn SC E none FE - VPA Vert. Position Absolute E [ Pn d 1 FE vpa VPB Line Position Backward * E [ Pn k 1 FE - VPR Vert. Position Relative E [ Pn e 1 FE - (R) VPR Vert. Position Relative E [ Pn e 1 FE - (R) VT Vertical Tabulation * ^K - FE - VTS Vertical Tabulation Set E J - FE -
Basic Characteristics
This section documents the capabilities that describe the basic and nature of the terminal, and also those that are relevant to the output of graphic characters.
Name | Description |
---|---|
os | Flag whose presence means that the terminal can overstrike. This means that outputting a graphic character does not erase whatever was present in the same character position before. The terminals that can overstrike include printing terminals, storage tubes (all obsolete nowadays), and many bit-map displays. |
eo | Flag whose presence means that outputting a space erases a character position even if the terminal supports overstriking. If this flag is not present and overstriking is supported, output of a space has no effect except to move the cursor. (On terminals that do not support overstriking, you can always assume that outputting a space at a position erases whatever character was previously displayed there.) |
gn | Flag whose presence means that this terminal type is a generic type which does not really describe any particular terminal. Generic types are intended for use as the default type assigned when the user connects to the system, with the intention that the user should specify what type he really has. One example of a generic type is the type network . Since the generic type cannot say how to do anything interesting with the terminal, termcap-using programs will always find that the terminal is too weak to be supported if the user has failed to specify a real terminal type in place of the generic one. The gnflag directs these programs to use a different error message: “You have not specified your real terminal type”, rather than “Your terminal is not powerful enough to be used”. |
hc | Flag whose presence means this is a hardcopy terminal. |
rp | String of commands to output a graphic character c, repeated n times. The first parameter value is the ASCII code for the desired character, and the second parameter is the number of times to repeat the character. Often this command requires padding proportional to the number of times the character is repeated. This effect can be had by using parameter arithmetic with % -sequences to compute the amount of padding, then generating the result as a number at the front of the string so that tputs will treat it as padding. |
hz | Flag whose presence means that the ASCII character cannot be output on this terminal because it is used for display commands. Programs handle this flag by checking all text to be output and replacing each ~with some other character(s). If this is not done, the screen will be thoroughly garbled. The old Hazeltine terminals that required such treatment are probably very rare today, so you might as well not bother to support this flag. |
CC | String whose presence means the terminal has a settable command character. The value of the string is the default command character (which is usually <ESC>). All the strings of commands in the terminal description should be written to use the default command character. If you are writing an application program that changes the command character, use the CCcapability to figure out how to translate all the display commands to work with the new command character. Most programs have no reason to look at the CCcapability. |
xb | Flag whose presence identifies Superbee terminals which are unable to transmit the characters <ESC> and Control-C. Programs which support this flag are supposed to check the input for the code sequences sent by the <F1> and <F2> keys, and pretend that <ESC> or Control-C (respectively) had been read. But this flag is obsolete, and not worth supporting. |
7bit vs. 8bit
These recommendations are optional. IBCS2 allows the leading escape to # be either the 7-bit E[
or 8-bit \233
introducer, in accordance with # the ANSI X.364/ISO 6429/ECMA-48 standard.
1.6.1 Describing the EncodingFor example, the
cm
string for a standard ANSI terminal is written asE[%i%d;%dH
. (E
stands for .)cm
by convention always requires two parameters, the vertical and horizontal goal positions, so this string specifies the encoding of two parameters. Here%i
increments the two values supplied, and each%d
encodes one of the values in decimal. If the cursor position values 20,58 are encoded with this string, the result isE[21;59H
.
First, here are the %
-sequences that generate output. Except for %%
, each of them encodes one parameter and advances the pointer to the following parameter.
%%
Output a single%
. This is the only way to represent a literal%
in a terminal command with parameters.%%
does not use up a parameter.%d
As inprintf
, output the next parameter in decimal.%2
Like%02d
inprintf
: output the next parameter in decimal, and always use at least two digits.%3
Like%03d
inprintf
: output the next parameter in decimal, and always use at least three digits. Note that%4
and so on are _not_ defined.%.
Output the next parameter as a single character whose ASCII code is the parameter value. Like%c
inprintf
.%+CHAR
Add the next parameter to the character CHAR, and output the resulting character. For example,%+
represents 0 as a space, 1 as!
, etc.
The following %
-sequences specify alteration of the parameters (their values, or their order) rather than encoding a parameter for output. They generate no output; they are used only for their side effects on the parameters. Also, they do not advance the "next parameter" pointer except as explicitly stated. Only %i
, %r
and %>
are defined in standard Unix termcap. The others are GNU extensions.
%i
Increment the next two parameters. This is used for terminals that expect cursor positions in origin 1. For example,%i%d,%d
would output two parameters with1
for 0,2
for 1, etc.%r
Interchange the next two parameters. This is used for terminals whose cursor positioning command expects the horizontal position first.%s
Skip the next parameter. Do not output anything.%b
Back up one parameter. The last parameter used will become once again the next parameter to be output, and the next output command will use it. Using%b
more than once, you can back up any number of parameters, and you can refer to each parameter any number of times.%>C1C2
Conditionally increment the next parameter. Here C1 and C2 are characters which stand for their ASCII codes as numbers. If the next parameter is greater than the ASCII code of C1, the ASCII code of C2 is added to it.%a OP TYPE POS
Perform arithmetic on the next parameter, do not use it up, and do not output anything. Here OP specifies the arithmetic operation, while TYPE and POS together specify the other operand.
Spaces are used above to separate the operands for clarity; the spaces don't appear in the data base, where this sequence is exactly five characters long. The character OP says what kind of arithmetic operation to perform. It can be any of these characters:
- = - assign a value to the next parameter, ignoring its old value. The new value comes from the other operand.
- + - add the other operand to the next parameter.
- - - subtract the other operand from the next parameter.
- * - multiply the next parameter by the other operand.
- / - divide the next parameter by the other operand.
The "other operand" may be another parameter's value or a constant; the character TYPE says which. It can be:
- p - Use another parameter. The character POS says which parameter to use. Subtract 64 from its ASCII code to get the position of the desired parameter relative to this one. Thus, the character
A
as POS means the parameter after the next one; the character?
means the parameter before the next one. - c - Use a constant value. The character POS specifies the value of the constant. The 0200 bit is cleared out, so that 0200 can be used to represent zero.
The following %
-sequences are special purpose hacks to compensate for the weird designs of obscure terminals. They modify the next parameter or the next two parameters but do not generate output and do not use up any parameters. %m
is a GNU extension; the others are defined in standard Unix termcap.
- %n - Exclusive-or the next parameter with 0140, and likewise the parameter after next.
- %m - Complement all the bits of the next parameter and the parameter after next.
- %B - Encode the next parameter in BCD. It alters the value of the parameter by adding six times the quotient of the parameter by ten. Here is a C statement that shows how the new value is computed:
PARM = (PARM / 10) * 16 + PARM % 10;
- %D - Transform the next parameter as needed by Delta Data terminals. This involves subtracting twice the remainder of the parameter by 16.
PARM -= 2 * (PARM % 16);
Terminal Type Name Conventions
Here is a list of standard suffixes and their conventional meanings:
- -w - Short for "wide". This is a mode that gives the terminal more columns than usual. This is normally a user option.
- -am - "Automatic margins". This is an alternate description for use when the terminal's margin-wrap switch is on; it contains the
am
flag. The implication is that normally the switch is off and the usual description for the terminal says that the switch is off. - -nam - "No automatic margins". The opposite of
-am
, this names an alternative description which lacks theam
flag. This implies that the terminal is normally operated with the margin-wrap switch turned on, and the normal description of the terminal says so. - -na - "No arrows". This terminal description initializes the terminal to keep its arrow keys in local mode. This is a user option.
- -rv - "Reverse video". This terminal description causes text output for normal video to appear as reverse, and text output for reverse video to come out as normal. Often this description differs from the usual one by interchanging the two strings which turn reverse video on and off.
This is a user option; you can choose either the "reverse video" variant terminal type or the normal terminal type, and termcap will obey.
- -s - "Status". Says to enable use of a status line which ordinary output does not touch (*note Status Line::).
Some terminals have a special line that is used only as a status line. For these terminals, there is no need for an -s
variant; the status line commands should be defined by default. On other terminals, enabling a status line means removing one screen line from ordinary use and reducing the effective screen height. For these terminals, the user can choose the -s
variant type to request use of a status line.
- -NLINES - Says to operate with NLINES lines on the screen, for terminals such as the Ambassador which provide this as an option. Normally this is a user option; by choosing the terminal type, you control how many lines termcap will use.
- -NPAGESp - Says that the terminal has NPAGES pages worth of screen memory, for terminals where this is a hardware option.
- -unk - Says that description is not for direct use, but only for reference in
tc
capabilities. Such a description is a kind of subroutine, because it describes the common characteristics of several variant descriptions that would use other suffixes in place of-unk
.
MS-DOS ANSI.SYS
Here is a description of the color and attribute controls supported in the ANSI.SYS driver under MS-DOS. Most console drivers and ANSI terminal emulators for Intel boxes obey these. They are a proper subset of the ECMA-48 escapes.
Bright black becomes gray, bright brown becomes yellow. These coincide with the prescriptions of the ISO 6429/ECMA-48 standard. * If the 5 attribute is on and you set a background color (40-47) it is supposed to enable bright background.
0 all attributes off 1 foreground bright 4 underscore on 5 blink on/background bright (not reliable with brown) 7 reverse-video 8 set blank (non-display) 10 set primary font 11 set first alternate font (on PCs, display ROM characters 1-31) 12 set second alternate font (on PCs, display IBM high-half chars) 3n set foreground color / 0=black, 1=red, 2=green, 3=brown, 4n set background color 4=blue, 5=magenta, 6=cyan, 7=white
STTY
Stty Control Settings
Name | Description |
---|---|
parenb | parenb Generate parity bit in output and expect parity bit in input. May be negated. |
parodd | Set odd parity (even if negated). May be negated. |
cs5, cs6, cs7, cs8 | Set character size to 5, 6, 7, or 8 bits. |
hup, hupcl | Send a hangup signal when the last process closes the tty. May be negated. |
cstopb | Use two stop bits per character (one if negated). May be negated. |
cread | Allow input to be received. May be negated. |
clocal | Disable modem control signals. May be negated. |
crtscts | Enable RTS/CTS flow control. Disables DTR/DSR flow control. Non-POSIX. May be negated. |
cdtrdsr | Enable DTR/DSR flow control. Disables RTS/CTS flow control. Non-POSIX. May be negated. No stty-readable form available. It needs to be supported by device. Usage on device without DTR/DSR support could lead to an error and failure of stty . |
Stty Input settings
Name | Description |
---|---|
ignbrk | Ignore break characters. May be negated. |
brkint | Make breaks cause an interrupt signal. May be negated. |
ignpar | Ignore characters with parity errors. May be negated. |
parmrk | Mark parity errors (with a 255-0-character sequence). May be negated. |
inpck | Enable input parity checking. May be negated. |
istrip | Clear high (8th) bit of input characters. May be negated. |
inlcr | Translate newline to carriage return. May be negated. |
igncr | Ignore carriage return. May be negated. |
icrnl | Translate carriage return to newline. May be negated. |
iutf8 | Assume input characters are UTF-8 encoded. May be negated. |
ixon | Enable XON/XOFF flow control (that is, CTRL-S /CTRL-Q ). May be negated. |
ixoff, tandem | Enable sending of stop character when the system input buffer is almost full, and start character when it becomes almost empty again. May be negated. |
iuclc | Translate uppercase characters to lowercase. Non-POSIX. May be negated. |
ixany | Allow any character to restart output (only the start character if negated). Non-POSIX. May be negated. |
imaxbel | Enable beeping and not flushing input buffer if a character arrives when the input buffer is full. Non-POSIX. May be negated. |
Stty Output settings
These arguments specify output-related operations.
Name | Description |
---|---|
opost | Postprocess output. May be negated. |
olcuc | Translate lowercase characters to uppercase. Non-POSIX. May be negated. |
ocrnl | Translate carriage return to newline. Non-POSIX. May be negated. |
onlcr | Translate newline to carriage return-newline. Non-POSIX. May be negated. |
onocr | Do not print carriage returns in the first column. Non-POSIX. May be negated. |
onlret | Newline performs a carriage return. Non-POSIX. May be negated. |
ofill | Use fill (padding) characters instead of timing for delays. Non-POSIX. May be negated. |
ofdel | Use delete characters for fill instead of null characters. Non-POSIX. May be negated. |
nl1, nl0 | Newline delay style. Non-POSIX. |
cr3, cr2, cr1, cr0 | Carriage return delay style. Non-POSIX. |
tab3, tab2, tab1, tab0 | Horizontal tab delay style. Non-POSIX. |
bs1, bs0 | Backspace delay style. Non-POSIX. |
vt1, vt0 | Vertical tab delay style. Non-POSIX. |
ff1, ff0 | Form feed delay style. Non-POSIX. |
Stty Local settings
Name | Description |
---|---|
isig | Enable interrupt , quit , and suspend special characters. May be negated. |
icanon | Enable erase , kill , werase , and rprnt special characters. May be negated. |
iexten | Enable non-POSIX special characters. May be negated. |
echo | Echo input characters. May be negated. |
echoe, crterase | Echo erase characters as backspace-space-backspace. May be negated. |
echok | Echo a newline after a kill character. May be negated. |
echonl | Echo newline even if not echoing other characters. May be negated. |
noflsh | Disable flushing after interrupt and quit special characters. May be negated. |
xcase | Enable input and output of uppercase characters by preceding their lowercase equivalents with , when icanon is set. Non-POSIX. May be negated. |
tostop | Stop background jobs that try to write to the terminal. Non-POSIX. May be negated. |
echoprt, prterase | Echo erased characters backward, between and / . Non-POSIX. May be negated. |
echoctl, ctlecho | Echo control characters in hat notation (^C ) instead of literally. Non-POSIX. May be negated. |
echoke, crtkill | Echo the kill special character by erasing each character on the line as indicated by the echoprt and echoe settings, instead of by the echoctl and echok settings. Non-POSIX. May be negated. |
Stty Combination settings
Name | Description |
---|---|
evenp, parity | Same as parenb -parodd cs7 . May be negated. If negated, same as -parenb cs8 . |
oddp | Same as parenb parodd cs7 . May be negated. If negated, same as -parenb cs8 . |
nl | Same as -icrnl -onlcr . May be negated. If negated, same as icrnl -inlcr -igncr onlcr -ocrnl -onlret . |
ek | Reset the erase and kill special characters to their default values. |
sane | Sets all special characters to their default values and: cread -ignbrk brkint -inlcr -igncr icrnl -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke |
cooked | Same as brkint ignpar istrip icrnl ixon opost isig icanon , plus sets the eof and eol characters to their default values if they are the same as the min and time characters. May be negated. If negated, same as raw . |
raw | Same as: -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig -icanon -xcase min 1 time 0May be negated. If negated, same as cooked . |
cbreak | Same as -icanon . May be negated. If negated, same as icanon . |
pass8 | Same as -parenb -istrip cs8 . May be negated. If negated, same as parenb istrip cs7 . |
litout | Same as -parenb -istrip -opost cs8 . May be negated. If negated, same as parenb istrip opost cs7 . |
decctlq | Same as -ixany . Non-POSIX. May be negated. |
tabs | Same as tab0 . Non-POSIX. May be negated. If negated, same as tab3 . |
lcase, LCASE | Same as xcase iuclc olcuc . Non-POSIX. May be negated. |
crt | Same as echoe echoctl echoke . |
dec | Same as echoe echoctl echoke -ixany intr ^C erase ^? kill C-u . |
Special characters
The special characters' default values vary from system to system. They are set with the syntax name value
, where the names are listed below and the value can be given either literally, in hat notation (^C
), or as an integer which may start with 0x
to indicate hexadecimal, 0
to indicate octal, or any other digit to indicate decimal.
For GNU stty, giving a value of ^-
or undef
disables that special character. (This is incompatible with Ultrix stty
, which uses a value of u
to disable a special character. GNU stty
treats a value u
like any other, namely to set that special character to .)
Name | Description |
---|---|
intr | Send an interrupt signal. |
quit | Send a quit signal. |
erase | Erase the last character typed. |
kill | Erase the current line. |
eof | Send an end of file (terminate the input). |
eol | End the line. |
eol2 | Alternate character to end the line. Non-POSIX. |
swtch | Switch to a different shell layer. Non-POSIX. |
start | Restart the output after stopping it. |
stop | Stop the output. |
susp | Send a terminal stop signal. |
dsusp | Send a terminal stop signal after flushing the input. Non-POSIX. |
rprnt | Redraw the current line. Non-POSIX. |
werase | Erase the last word typed. Non-POSIX. |
lnext | Enter the next character typed literally, even if it is a special character. Non-POSIX. |
Special settings
- min N - Set the minimum number of characters that will satisfy a read until the time value has expired, when
-icanon
is set. - time N - Set the number of tenths of a second before reads time out if the minimum number of characters have not been read, when
-icanon
is set. - ispeed N - Set the input speed to N.
- ospeed N - Set the output speed to N.
- rows N - Tell the tty kernel driver that the terminal has N rows. Non-POSIX.
- cols N, columns N - Tell the kernel that the terminal has N columns. Non-POSIX.
- size - Print the number of rows and columns that the kernel thinks the terminal has. (Systems that don't support rows and columns in the kernel typically use the environment variables
LINES
andCOLUMNS
instead; however, GNUstty
does not know anything about them.) Non-POSIX. - line N - Use line discipline N. Non-POSIX.
- speed - Print the terminal speed.
- N - Set the input and output speeds to N. N can be one of: 0 50 75 110 134 134.5 150 200 300 600 1200 1800 2400 4800 9600 19200 38400
exta
extb
.exta
is the same as 19200;extb
is the same as 38400. 0 hangs up the line if-clocal
is set.
Color Terminals
color256 () { local L=$(sed 's/[0-9]//g; s/./#/g' <<<`seq -s+0 $(($COLUMNS - 10))`); for i in `seq 0 $(tput colors)`; do printf " %.3d `tput setab $i`${L}${R} %.3d `tput setab 0;tput setaf 7`n" $i $i | tr '#' ' '; done }
for F in `find ~/.terminfo/ -type f | sed 's/^.*///' | xargs -P0 -I'TT' sh -c 'echo "$(tput -T TT colors): TT"'|sed '/^-/d'| grep ^16:|cut -d: -f2`; do echo -e "nn"; pm $F; export TERM=$F; tput -T $F initc; color256; done
find ~/.terminfo/ -type f | sed 's/^.*///' | xargs -I'TT' sh -c 'echo "$(tput -T TT colors): TT"'|sed '/^-/d'
Terminals with 16 Colors
- aixterm-16color
- amiga-vnc
- hp2397
- hp2397a
- hp+color
- ibm+16color
- konsole-16color
- nsterm-16color
- nsterm-7-c
- nsterm-7-c-s
- nsterm-acs-c
- nsterm-acs-c-s
- nsterm-c
- nsterm+c
- nsterm-c-7
- nsterm-c-acs
- nsterm-c-s
- nsterm-c-s-7
- nsterm-c-s-acs
- rxvt-16color
- screen-16color
- screen-16color-bce
- screen-16color-bce-s
- screen-16color-s
- xterm-16color
Terminals with 52 Colors
- d430c-dg-ccc
- d430c-unix-25-ccc
- d430c-unix-ccc
- d430c-unix-s-ccc
- d430c-unix-sr-ccc
- d430c-unix-w-ccc
- d430-dg-ccc
- d430-unix-25-ccc
- d430-unix-ccc
- d430-unix-s-ccc
- d430-unix-sr-ccc
- d430-unix-w-ccc
- dg+ccc
- dgunix+ccc
Terminals with 64 Colors
- hpterm-color
- wy370
- wy370-101k
- wy370-105k
- wy370-EPC
- wy370-nk
- wy370-rv
- wy370-vb
- wy370-w
- wy370-wvb
- wyse370
- Eterm-88color
- rxvt-88color
- xterm-88color
- xterm+88color
Terminals with 256 colors
- Eterm-256color
- gnome-256color
- konsole-256color
- putty-256color
- rxvt-256color
- screen-256color
- screen-256color-bce
- screen-256color-bce-s
- screen-256color-s
- xterm-256color
- xterm+256color
View All tput capabilities
http://blogs.msdn.com/adioltean/articles/271063.aspx
function tputs(){ infocmp -1|sed 's/^[ ]*//; /=/!d; s/=.*//g; /[#|]/d'; }
Some common terminfo parameter sequences, their termcap equivalents, and some terminal types which commonly have such sequences, are:
terminfo termcap Representative Terminals --------------------------------------------------------------- %p1%c %. adm %p1%d %d hp, ANSI standard, vt100 %p1%+%c %+x concept %i %iq ANSI standard, vt100 %p1%?%>%t%p1%+%; %>xy concept %p2 is printed before %p1 %r hp
Installing your Own Terminfo
MostLike, or if that is offline I uploaded a copy: mostlike - manpages with color looking like most
rm -rvf ~/.terminfo mkdir -pv ~/.terminfo curl -o terminfo.master http://nion.modprobe.de/mostlike.txt; curl -Ss ftp://invisible-island.net/ncurses/terminfo.src.gz export TERMINFO=~/.terminfo; sudo tic -e screen-256color,screen-256color-s,screen-256color-bce,screen-256color-bce-s,xterm+256color,xterm,xterm-pcolor terminfo.src
256 Colors in Terminal
256 Colors (Background)
W=`tput setaf 7` RC="E[0;0;0m" L=$(sed 's/[0-9]//g; s/./ /g' <<<`seq -s+0 $(($COLUMNS/2))`); for i in `seq 0 256`; do printf "${W}n%.3d `tput setab $i`${L}${RC}" $i; done
256 Colors (Foreground)
W=`tput setaf 7` WB=`tput setab 0` RC="E[0;0;0m" L=$(sed 's/[0-9]//g; s/./#/g' <<<`seq -s+0 $(($COLUMNS/2))`); for i in `seq 0 256`; do printf "${WB}n%.3d `tput setaf $i`${L}${RC}" $i; done
Terminal Capabilities - Infocmp
infocmp -1Lq|grep -v "$TERM|#"|tr -d ' '
DEC/ANSI special sequences
List of the DEC/ANSI special sequences recognized:
Action | Meaning |
---|---|
%% |
The percent sign |
%t |
The time the request was received in Universal Coordinated Time
since the epoch (Jan. 1, 1970) measured in microseconds. The value
is preceded by t= . |
%D |
The time from when the request was received to the time the
headers are sent on the wire. This is a measure of the duration
of the request. The value is preceded by D= .
The value is measured in microseconds. |
%{VARNAME}e |
The contents of the environment
variable VARNAME . |
%{VARNAME}s |
The contents of the SSL environment
variable VARNAME , if mod_ssl is enabled. |
RIS | full reset |
SC | save cursor |
RC | restore cursor |
LL | home-down |
RSR | reset scroll region |
DECSTR | soft reset (VT320) |
S7C1T | 7-bit controls (VT220) |
ISO DEC G0 | enable DEC graphics for G0 |
ISO UK G0 | enable UK chars for G0 |
ISO US G0 | enable US chars for G0 |
ISO DEC G1 | enable DEC graphics for G1 |
ISO UK G1 | enable UK chars for G1 |
ISO US G1 | enable US chars for G1 |
DECPAM | application keypad mode |
DECPNM | normal keypad mode |
DECANSI | enter ANSI mode |
ECMA[+-]AM | keyboard action mode |
ECMA[+-]IRM | insert replace mode |
ECMA[+-]SRM | send receive mode |
ECMA[+-]LNM | linefeed mode |
DEC[+-]CKM | application cursor keys |
DEC[+-]ANM | set VT52 mode |
DEC[+-]COLM | 132-column mode |
DEC[+-]SCLM | smooth scroll |
DEC[+-]SCNM | reverse video mode |
DEC[+-]OM | origin mode |
DEC[+-]AWM | wraparound mode |
DEC[+-]ARM | auto-repeat mode |
Term Sorted
./MKtermsort.sh |sed 's/.*/* (.*) *//1/g'|sort -u|grep ^[a-zA-Z]|sortwc|grep -v ^static|sort -d|tr " " ','|sed 's/([^,]{1,}),/1,/g'
AB,ac,acs_btee,acsc,acs_chars,acs_hline,acs_llcorner,acs_lrcorner,acs_ltee,acs_plus,acs_rtee,acs_ttee,acs_ulcorner,acs_urcorner,acs_vline,ae,AF,al,AL,alt_scancode_esc,am,apstr,arrow_key_map,as,auto_left_margin,auto_right_margin,back_color_erase,backspace_delay,backspace_if_not_bs,backspaces_with_bs,back_tab,batt1,batt2,bc,bce,bel,bell,bicr,binel,birep,bit_image_carriage_return,bit_image_entwining,bit_image_newline,bit_image_repeat,bit_image_type,bitwin,bitype,bl,blink,bold,box1,box2,box_chars_1,bs,bt,BT,btml,btns,buffer_capacity,bufsz,buttons,bw,bx,can_change,carriage_return,carriage_return_delay,cb,cbt,cc,CC,ccc,cd,ce,ceol_standout_glitch,ch,change_char_pitch,change_line_pitch,change_res_horz,change_res_vert,change_scroll_region,char_padding,char_set_names,chr,chts,ci,civis,cl,clear,clear_all_tabs,clear_margins,clear_screen,clr_bol,clr_eol,clr_eos,cm,CM,cmdch,cnorm,co,Co,code_set_init,col_addr_glitch,colb0,colb1,colb2,colb3,colb4,colb5,colb6,colb7,colf0,colf1,colf2,colf3,colf4,colf5,colf6,colf7,color_names,colornm,colors,cols,column_address,columns,command_character,cpi,cpi_changes_res,cpix,cps,cr,cr_cancels_micro_mode,create_window,crt_no_scrolling,crxm,cs,csin,csnm,csr,ct,cub,cub1,cud,cud1,cuf,cuf1,cup,cursor_address,cursor_down,cursor_home,cursor_invisible,cursor_left,cursor_mem_address,cursor_normal,cursor_right,cursor_to_ll,cursor_up,cursor_visible,cuu,cuu1,cv,cvr,cvvis,CW,cwin,da,daisy,db,dB,dc,dC,DC,dch,dch1,dclk,defbi,defc,define_bit_image_region,define_char,delete_character,delete_line,dest_tabs_magic_smso,device_type,devt,DI,dial,dial_phone,dim,dispc,display_clock,display_pc_char,dis_status_line,DK,dl,DL,dl1,dm,dN,do,DO,docr,dot_horz_spacing,dot_vert_spacing,down_half_line,ds,dsl,dT,dv,eA,eat_newline_glitch,ec,ech,ed,ehhlm,ei,el,el1,elhlm,elohlm,ena_acs,enacs,endbi,end_bit_image_region,enter_alt_charset_mode,enter_am_mode,enter_blink_mode,enter_bold_mode,enter_ca_mode,enter_delete_mode,enter_dim_mode,enter_doublewide_mode,enter_draft_quality,enter_horizontal_hl_mode,enter_insert_mode,enter_italics_mode,enter_left_hl_mode,enter_leftward_mode,enter_low_hl_mode,enter_micro_mode,enter_near_letter_quality,enter_normal_quality,enter_pc_charset_mode,enter_protected_mode,enter_reverse_mode,enter_right_hl_mode,enter_scancode_mode,enter_secure_mode,enter_shadow_mode,enter_standout_mode,enter_subscript_mode,enter_superscript_mode,enter_top_hl_mode,enter_underline_mode,enter_upward_mode,enter_vertical_hl_mode,enter_xon_mode,eo,erase_chars,erase_overstrike,erhlm,es,eslok,ethlm,evhlm,exit_alt_charset_mode,exit_am_mode,exit_attribute_mode,exit_ca_mode,exit_delete_mode,exit_doublewide_mode,exit_insert_mode,exit_italics_mode,exit_leftward_mode,exit_micro_mode,exit_pc_charset_mode,exit_scancode_mode,exit_shadow_mode,exit_standout_mode,exit_subscript_mode,exit_superscript_mode,exit_underline_mode,exit_upward_mode,exit_xon_mode,F1,F2,F3,F4,F5,F6,F7,F8,F9,Fa,FA,Fb,FB,Fc,FC,Fd,FD,Fe,FE,ff,Ff,FF,Fg,FG,fh,Fh,FH,Fi,FI,fixed_pause,Fj,FJ,Fk,FK,Fl,FL,flash,flash_hook,flash_screen,fln,Fm,FM,Fn,FN,Fo,FO,font0,font1,font2,font3,font4,font5,font6,font7,form_feed,Fp,FP,Fq,FQ,Fr,FR,from_status_line,fs,FS,fsl,FT,FU,FV,FW,FX,FY,FZ,G1,G2,G3,G4,GC,GD,generic_type,getm,get_mouse,GH,GL,Gm,gn,gnu_has_meta_key,goto_window,GR,GU,GV,hangup,hard_copy,hard_cursor,has_hardware_tabs,has_meta_key,has_print_wheel,has_status_line,hc,HC,hd,hl,hls,ho,home,hook,horizontal_tab_delay,hpa,hs,ht,hts,hu,HU,hue_lightness_saturation,hup,hz,i1,i2,i3,ic,Ic,IC,ich,ich1,if,il,il1,im,in,ind,indn,init_1string,init_2string,init_3string,initc,init_file,initialize_color,initial ize_pair,initp,init_prog,init_tabs,insert_character,insert_line,insert_null_glitch,insert_padding,invis,ip,iP,Ip,iprog,is,is1,is2,is3,it,k;,k0,k1,K1,k2,K2,k3,K3,k4,K4,k5,K5,k6,k7,k8,k9,ka,kA,ka1,ka3,kact,kb,kB,kb2,kbeg,kBEG,kbs,kbtab,kC,kc1,kc3,kcan,kCAN,kcbt,kclo,kclr,kcmd,kCMD,kcpn,kcpy,kCPY,kcrt,kCRT,kctab,kcub1,kcud1,kcuf1,kcuu1,kd,kD,kDC,kdch1,kDL,kdl1,kdo,ke,kE,ked,kel,kend,kEND,kent,kEOL,kext,kEXT,key_a1,key_a3,key_b2,key_backspace,key_beg,key_btab,key_c1,key_c3,key_cancel,key_catab,key_clear,key_close,key_command,key_copy,key_create,key_ctab,key_dc,key_dl,key_down,key_eic,key_end,key_enter,key_eol,key_eos,key_exit,key_f0,key_f1,key_f10,key_f11,key_f12,key_f13,key_f14,key_f15,key_f16,key_f17,key_f18,key_f19,key_f2,key_f20,key_f21,key_f22,key_f23,key_f24,key_f25,key_f26,key_f27,key_f28,key_f29,key_f3,key_f30,key_f31,key_f32,key_f33,key_f34,key_f35,key_f36,key_f37,key_f38,key_f39,key_f4,key_f40,key_f41,key_f42,key_f43,key_f44,key_f45,key_f46,key_f47,key_f48,key_f49,key_f5,key_f50,key_f51,key_f52,key_f53,key_f54,key_f55,key_f56,key_f57,key_f58,key_f59,key_f6,key_f60,key_f61,key_f62,key_f63,key_f7,key_f8,key_f9,key_find,key_help,key_home,key_ic,key_il,key_left,key_ll,key_mark,key_message,key_mouse,key_move,key_next,key_npage,key_open,key_options,keypad_local,keypad_xmit,key_ppage,key_previous,key_print,key_redo,key_reference,key_refresh,key_replace,key_restart,key_resume,key_right,key_save,key_sbeg,key_scancel,key_scommand,key_scopy,key_screate,key_sdc,key_sdl,key_select,key_send,key_seol,key_sexit,key_sf,key_sfind,key_shelp,key_shome,key_sic,key_sleft,key_smessage,key_smove,key_snext,key_soptions,key_sprevious,key_sprint,key_sr,key_sredo,key_sreplace,key_sright,key_srsume,key_ssave,key_ssuspend,key_stab,key_sundo,key_suspend,key_undo,key_up,kF,kf0,kf1,kf10,kf11,kf12,kf13,kf14,kf15,kf16,kf17,kf18,kf19,kf2,kf20,kf21,kf22,kf23,kf24,kf25,kf26,kf27,kf28,kf29,kf3,kf30,kf31,kf32,kf33,kf34,kf35,kf36,kf37,kf38,kf39,kf4,kf40,kf41,kf42,kf43,kf44,kf45,kf46,kf47,kf48,kf49,kf5,kf50,kf51,kf52,kf53,kf54,kf55,kf56,kf57,kf58,kf59,kf6,kf60,kf61,kf62,kf63,kf7,kf8,kf9,kfnd,kFND,kh,kH,khlp,kHLP,kHOM,khome,khts,kI,kIC,kich1,kil1,kind,kl,kL,kLFT,kll,km,kM,Km,kmous,kmov,kMOV,kmpf1,kmpf2,kmpf3,kmpf4,kmpf5,kmpf6,kmpf7,kmpf8,kmpf9,kmpt1,kmpt2,kmpt3,kmpt4,kmpt5,kmpt6,kmpt7,kmpt8,kmpt9,kmrk,kmsg,kMSG,kn,kN,knl,knp,knpn,knxt,kNXT,ko,kopn,kopt,kOPT,kP,kpp,kppn,kprt,kPRT,kprv,kPRV,kquit,kr,kR,krdo,kRDO,kref,kres,kRES,krfr,kri,kRIT,krmir,krpl,kRPL,krst,ks,kS,ksav,kSAV,kscl,kscr,ksel,ksf1,ksf10,ksf2,ksf3,ksf4,ksf5,ksf6,ksf7,ksf8,ksf9,kslt,kspd,kSPD,kt,kT,ktab,ktbc,ku,kund,kUND,l0,l1,l2,l3,l4,l5,l6,l7,l8,l9,la,label_format,label_height,label_off,label_on,label_width,lab_f0,lab_f1,lab_f10,lab_f2,lab_f3,lab_f4,lab_f5,lab_f6,lab_f7,lab_f8,lab_f9,le,LE,Lf,LF,lf0,lf1,lf10,lf2,lf3,lf4,lf5,lf6,lf7,lf8,lf9,lh,li,linefeed_if_not_lf,linefeed_is_newline,lines,lines_of_memory,ll,lm,LO,lpi,lpi_changes_res,lpix,lvert,lw,ma,maddr,magic_cookie_glitch,magic_cookie_glitch_ul,max_attributes,max_colors,maximum_windows,max_micro_address,max_micro_jump,max_pairs,mb,MC,mc0,mc4,mc5,mc5i,mc5p,mcs,mcub,mcub1,mcud,mcud1,mcuf,mcuf1,mcuu,mcuu1,md,me,meml,memory_above,memory_below,memory_lock,memory_unlock,memu,meta_off,meta_on,mgc,mh,mhpa,mi,Mi,micro_col_size,micro_column_address,micro_down,micro_left,micro_line_size,micro_right,micro_row_address,micro_up,minfo,mir,mjump,mk,ml,ML,mls,mm,mo,mouse_info,move_insert_mode,move_standout_mode,mp,mr,MR,mrcup,ms,msgr,MT,mu,mvpa,MW,nc,NC,ncv,nd,ND,ndscr,needs_xon_xoff,nel,newline,new_line_delay,nl,Nl,NL,nlab,no_color_video,no_correctly_working_cr,no_esc_ctlc,non_dest_scroll_region,non_rev_rmcup,no_pad_char,NP,npc,npins,NR,nrrmc,ns,number_of_function_keys,number_of_pins,num_labels,nw,nx,nxon,oc,op,orc,order_of_pins,orhi,orig_colors,orig_pair,orl,orvi,os,OTbc,OTbs,OTdB,OTdC,OTdN,OTdT,OTG1,OTG2,OTG3,OTG4,OTGC,OTGD,OTGH,OTGL,OTGR,OTGU,OTGV,other_non_function_keys,OTi2,OTkn,OTko,OTma,OTMT,OTnc,OTnl,OTNL,OTns,OTpt,OTrs,OTug,OTxr,output_res_char,output_res_horz_inch,output_res_line,output_res_vert_inch,over_strike,pa,PA,pad,pad_char,padding_baud_rate,pairs,parm_dch,parm_delete_line,parm_down_cursor,parm_down_micro,parm_ich,parm_index,parm_insert_line,parm_left_cursor,parm_left_micro,parm_right_cursor,parm_right_micro,parm_rindex,parm_up_cursor,parm_up_micro,pause,pb,pc,pc_term_options,pctrm,pf,pfkey,pfloc,pfx,pfxl,pk,pkey_key,pkey_local,pkey_plab,pkey_xmit,pl,plab_norm,pln,pn,po,pO,porder,print_rate,print_screen,prot,prtr_non,prtr_off,prtr_on,prtr_silent,ps,pt,PU,pulse,px,QD,qdial,quick_dial,r1,r2,r3,RA,rbim,rc,RC,rcsd,remove_clock,rep,repeat_char,req_for_input,req_mouse_pos,reqmp,reset_1string,reset_2string,reset_3string,reset_file,restore_cursor,return_does_clr_eol,rev,rf,RF,rfi,ri,RI,rin,ritm,rlm,rmacs,rmam,rmclk,rmcup,rmdc,rmicm,rmir,rmkx,rmln,rmm,rmp,rmpch,rmsc,rmso,rmul,rmxon,row_address,row_addr_glitch,rp,rP,RQ,rs,rs1,rs2,rs3,rshm,rsubm,rsupm,rum,rvert,rwidm,RX,s0,s0ds,s1,S1,s1ds,s2,S2,s2ds,s3,S3,s3ds,S4,S5,S6,S7,S8,sa,sA,SA,sam,save_cursor,Sb,sbim,sc,SC,scancode_escape,scesa,scesc,sclk,scp,scroll_forward,scroll_reverse,scs,scsd,sdrfq,se,select_char_set,semi_auto_right_margin,set0_des_seq,set1_des_seq,set2_des_seq,set3_des_seq,set_a_attributes,setab,set_a_background,setaf,set_a_foreground,set_attributes,setb,set_background,set_bottom_margin,set_bottom_margin_parm,set_clock,setcolor,set_color_band,set_color_pair,setf,set_foreground,set_left_margin,set_left_margin_parm,set_lr_margin,set_page_length,set_pglen_inch,set_right_margin,set_right_margin_parm,set_tab,set_tb_margin,set_top_margin,set_top_margin_parm,set_window,sf,Sf,SF,sg,sgr,sgr0,sgr1,sitm,sL,slength,slines,slm,smacs,smam,smcup,smdc,smgb,smgbp,smgl,smglp,smglr,smgr,smgrp,smgt,smgtb,smgtp,smicm,smir,smkx,smln,smm,smpch,smsc,smso,smul,smxon,snlq,snrmq,so,sp,spinh,spinv,sr,SR,sshm,ssubm,ssupm,st,start_bit_image,start_char_set_def,status_line_esc_ok,stop_bit_image,stop_char_set_def,subcs,subscript_characters,sum,supcs,superscript_characters,swidm,SX,ta,tab,tbc,te,termcap_init2,termcap_reset,these_cause_cr,ti,tilde_glitch,TO,tone,topl,to_status_line,transparent_underline,ts,tsl,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,uc,ue,ug,ul,underline_char,up,UP,up_half_line,us,user0,user1,user2,user3,user4,user5,user6,user7,user8,user9,ut,vb,ve,vi,virtual_terminal,vpa,vs,vt,WA,wait,wait_tone,WG,wi,widcs,wide_char_size,width_status_line,wind,wingo,wnum,ws,wsl,xb,xenl,XF,Xh,xhp,xhpa,xl,Xl,xmc,xn,XN,xo,Xo,xoffc,xoff_character,xon,xonc,xon_character,xon_xoff,xr,Xr,xs,xsb,xt,Xt,Xv,xvpa,Xy,Ya,YA,Yb,YB,Yc,YC,Yd,YD,Ye,YE,Yf,YF,Yg,YG,Yh,Yi,Yj,Yk,Yl,Ym,Yn,Yo,Yp,Yv,Yw,Yx,Yy,Yz,YZ,Za,ZA,Zb,ZB,Zc,ZC,Zd,ZD,Ze,ZE,zerom,zero_motion,Zf,ZF,Zg,ZG,Zh,ZH,Zi,ZI,Zj,ZJ,Zk,ZK,Zl,ZL,Zm,ZM,Zn,ZN,Zo,ZO,Zp,ZP,Zq,ZQ,Zr,ZR,Zs,ZS,Zt,ZT,Zu,ZU,Zv,ZV,Zw,ZW,Zx,ZX,Zy,ZY,Zz,ZZ
TERMINAL TYPE DESCRIPTIONS SOURCE FILE
ANSI, UNIX CONSOLE, AND SPECIAL TYPES Specials ANSI.SYS/ISO 6429/ECMA-48 Capabilities ANSI/ECMA-48 terminals and terminal emulators DOS ANSI.SYS variants ANSI console types BeOS Linux consoles Mach OSF Unix QNX NetBSD consoles FreeBSD console entries 386BSD and BSD/OS Consoles DEC VT52 DEC VT100 and compatibles VT100 emulations X terminal emulators MGR UNIX VIRTUAL TERMINALS, VIRTUAL CONSOLES, AND TELNET CLIENTS Pilot Pro Palm-Top COMMERCIAL WORKSTATION CONSOLES Alpha consoles Sun consoles Iris consoles NeWS consoles NeXT consoles Sony NEWS workstations Common Desktop Environment Non-Unix Consoles COMMON TERMINAL TYPES Altos Hewlett-Packard (hp) Honeywell-Bull Lear-Siegler (adm) Prime Qume (qvt) Televideo (tvi) Visual (vi) Wyse (wy) Kermit terminal emulations NON-ANSI TERMINAL EMULATIONS Avatar RBcomm LCD DISPLAYS Matrix Orbital OLDER TERMINAL TYPES AT&T (att, tty) Ampex (Dialogue) Ann Arbor (aa) Applied Digital Data Systems (adds) C. Itoh Electronics Control Data (cdc) Getronics Human Designed Systems (Concept) Contel Business Systems. Data General (dg) Datamedia (dm) Falco
Just something sorta cool for you to check out
{ local t=`tputm 'clear' 'setaf 75'` l a b f=/tmp/ps IFS=' '; exec 6<>$f;ps L|tr -s ' ' &>$f; while read -u6 l;do a=${l/% */} b=${l/* /}; figlet -rtw $((${COLUMNS} /2 )) -f big "$l"; tput sgr0; command ps wwo pid:6,user:8,vsize:8,comm:20,$a:50 k -$a -A;cont; done; };
Links and Resources
« HTTP Status Codes and Htaccess ErrorDocumentsWindows Batch Script saves Screenshots every 10min »
Comments