Subject: For what it's worth, heres a version of clear
From: [email-masked] (Allan Peda)

22 Mar 1998 05:48:16 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="------------8F1433E2C9E4734719BB8B8C"
To: "[email-masked]" <[email-masked]>

This is a multi-part message in MIME format.
--------------8F1433E2C9E4734719BB8B8C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

It gets the job done. 
What the heck, I'll attach an ansi escape code 
table as well. (Just my $0.02)
--------------8F1433E2C9E4734719BB8B8C
Content-Type: text/plain; charset=iso-8859-1; name="clear"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline; filename="clear"

echo =1B[2J
--------------8F1433E2C9E4734719BB8B8C
Content-Type: text/html; charset=us-ascii; name="escape_sequences.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="escape_sequences.html"
Content-Base: "file:///D|/usr/allan/work_area/html_do
	cs/cygwin32/escape_sequences.html"

<html><head><title>(5.12) ANSI Escape Sequences</title></head>

<body>

<h1>OS/2 Warp FAQ List (20 Feb 95)</h1>

<hr>

<!-- Inf-FILE version 0.9b, build 0004 -->

<a href="warpfaq.1.toc.html">Table of Contents</a> 

<hr>

<h2>(5.12) ANSI Escape Sequences</h2>

<pre>

</pre>

<pre><b>What ANSI escape sequences can be used? </b>

</pre>

<pre>ANSI escape sequences provide cursor and screen control in OS/2 Warp 

character mode sessions.  By default ANSI support is turned ON (although 

it may be turned off with the command ANSI OFF).  ANSI support is also 

available in DOS sessions if the device driver ANSI.SYS is loaded.  See 

the online Command Reference for details. 

</pre>

<pre>The following ANSI escape sequences are available: 

</pre>

<pre> <u>Key </u>      

 ESC       Refers to ASCII code 27 (i.e. the Escape key) 

 #         Replace with the appropriate number 

 ....      Replace with additional attributes, if desired 

</pre>

<pre> <u>Escape Code Sequence </u>         <u>Function </u>

 <i>Cursor Controls </i>              

 ESC[#;#H or ESC[#;#f          Moves cursor to line #, column # 

 ESC[#A                        Moves cursor up # lines 

 ESC[#B                        Moves cursor down # lines 

 ESC[#C                        Moves cursor forward # spaces 

 ESC[#D                        Moves cursor back # spaces 

 ESC[#;#R                      Reports current cursor line and column 

 ESC[s                         Saves cursor position for recall later 

 ESC[u                         Return to saved cursor position 

 <i>Erase Functions </i>              

 ESC[2J                        Clear screen and home cursor 

 ESC[K                         Clear to end of line 

 <i>Set Graphics Rendition </i>       

 ESC[#;#;....;#m               Set display attributes where # is 

                               0 for normal display 

                               1 bold on 

                               4 underline (mono only) 

                               5 blink on 

                               7 reverse video on 

                               8 nondisplayed (invisible) 

                               30 black foreground 

                               31 red foreground 

                               32 green foreground 

                               33 yellow foreground 

                               34 blue foreground 

                               35 magenta foreground 

                               36 cyan foreground 

                               37 white foreground 

                               40 black background 

                               41 red background 

                               42 green background 

                               43 yellow background 

                               44 blue background 

                               45 magenta background 

                               46 cyan background 

                               47 white background 

 ESC[=#;7h                     Put screen in indicated mode where # is 

                               0 for 40x25 black and white 

                               1 40x25 color 

                               2 80x25 black and white 

                               3 80x25 color 

                               4 320x200 color graphics 

                               5 320x200 black and white graphics 

                               6 640x200 black and white graphics 

                               7 to wrap at end of line 

 ESC[=#;7l                     Resets mode # set with above command 

 <i>Keyboard Reassignments </i>       

 ESC[#;#;....#p                The first ASCII code defines what is to be 

                               changed; the remaining codes define what it 

                               is to be changed to; strings are permitted. 

                               Examples: 

                               ESC[65;81p - A becomes Q 

                               ESC[81;65p - Q becomes A 

                               ESC[0;68;&quot;dir&quot;;13p - Assign the F10 key to 

                               a DIR command. 

                               The 0;68 portion is the extended ASCII code 

                               for the F10 key and 13 is the ASCII code 

                               for a carriage return. 

                               Other function key codes: F1=59, F2=60, 

                               F3=61, ... F10=68. 

</pre>

<pre> You can use ANSI escape sequences in the PROMPT environment variable to 

 create complex command line prompts.  See the online Command Reference 

 (under PROMPT) for details. 

</pre>

<pre> For example, if you have a color monitor, try editing your CONFIG.SYS 

 file so that <!-- lines seq -->

</pre>

<pre> SET PROMPT=$e[32;40m$e[1m[$P]$e[0m

</pre>

<pre> to obtain a more colorful OS/2 Warp command line prompt.  (Case is 

 significant in the example given.)  You can do the same for your DOS 

 sessions if you edit PROMPT in AUTOEXEC.BAT, assuming you have ANSI.SYS 

 loaded.  Note that the $i portion of your PROMPT will enable the help 

 line at the top of the window or screen.  It is not included in the 

 example above. 

</pre>

<pre> 

</pre>

<pre> <b>Related information: </b><!-- lines seq -->

</pre>

<pre> (5.10) <a href="warpfaq.2.0060.html">Clever Tricks </a>

  </pre>

<hr>

 

</body></html>

--------------8F1433E2C9E4734719BB8B8C--

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".