bash - What is the ANSI escape code sequence "ESC[>c"? -
after typing "vi [filename]" in bash following result:
....\r\"gu1.txt\" 16l, 87c esc[>cesc[1;1h 111\r\n1112.....
the first text marked in row file name following number of lines , columns of vi result.
the second text includes 2 escape sequences don't understand meaning : esc[>c , esc[1;1h.
the last text includes text shown result of vi, i.e. content of file.
can please explain ansi escape code sequence esc[>c , how related escape code sequence comes right after esc[1;1h?
thanks in advance
i believe ansi standard isn't available publicly, quick google turned a third-party summary based on dec pdp-10 docs.
for first one: 'c' command means "da" "device attributes". send csi 'c' no arguments terminal, , sends csi 'c' private mode characters mean terminal-specific. private mode characters must start 1 of "<=>?", , run digit, trailing character, or letter. so, esc[>c minimal response somehow encodes 2 bits of terminal-specific information (by choosing > on 1 of other 3 choices). note esc[>c equivalent esc[>0c, how dec vt240 terminals distinguished vt220, may mean text file captured output intended vt240 emulator. mean kinds of other things. @ rate, sending terminal should have no effect.
the second 1 lot easier. 'h' command means "cup", "cursor position": given arguments n , m, moves cursor 1-based row n , column m top left. so, esc[1;1h moves cursor top-left corner of screen.
Comments
Post a Comment