This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Trouble in RXVT with line wrap



# The unescaped open bracket is just that. It is part of a multi-character 
# escape sequence (\033 is ESCape) defined by the terminal control mechanism 
# emulated by the Cygwin console code (layered over the Windows character 
# subsystem window) or the RXVT terminal emulator (something in the vt1xx or 
# vt2xx series, I guess). 

These look _distinctly_ like the standard ANSI escape sequences.
DOS people have been using them (via ANSI.SYS) for aeons.  I used
to use these with PC-DOS 3.3 on an ITT XTRA (4.77 MHz) back in
the day.  I'm pretty sure my ITT DOS manual lists them in an
appendix.  They've been around at _least_ that long, so I'm 
sure finding listings of them on the internet is trivial.  I
think they were developed by ANSI way back before ISO was an 
entity of note.  

# For example, ESC-[-32m and ESC-[-33m are two single 
# control sequences. I don't know what they do for sure, but 
# judging from the appearance of the resulting prompt, they 
# change the color. 

Green foreground and yellow foreground, respectively
(although without the bold/high-intensity setting
(ESC[1m) yellow will look more like brown or orange).  

There are also escape sequences for changing the 
background, the cursor position (including remembering
and restoring one position), erasing the whole display
or just one line, and dorking around with remapping 
keyboard scan codes, among other things.  

# The \w, \u, \h, etc. are expanded by the shell. 

These are essentially unrelated, more or less.
Though their usefulness in collaboration with the
escape sequences should be obvious.  (The DOS
equivalents would be $p, $g, $t, and so on, and
those get used together with the escape sequences
also, for similar effects.)

# \033 is ESC. 

It is noteworthy that since COMMAND.COM lacks such
a facility, DOS people had to take a hex editor to
a BAT file in order to insert an ESC and get these
sequences to work.  bash makes this a bit easier.

But the underlying escape sequences are messages
to the terminal, console, terminal emulator, 
telnet app, or whatever.  I think they're pretty
much platform-inspecific and platform-unaware.  


-- 
Your font seems to be:    proportional     fixed
                                             ^
                                             |

(Fontmeter only accurate for about 90% of fonts.)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]