www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/06/10:12:18

Date: Thu, 6 Jan 2000 12:07:11 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Colin Forster <colin AT imrworldwide DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: clear screen in bash ?
In-Reply-To: <38742647.DDFA40BB@imrworldwide.com>
Message-ID: <Pine.SUN.3.91.1000106120509.20220L@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 6 Jan 2000, Colin Forster wrote:

> 1) alias cls='echo -n ^[[2J' # the ^[ is an esc (in vi I use ^V followed
> by
> # ^[ where ^ is holding down the cntrl key)
> 
> 2) compile this into clear.exe or cls.exe:
> 
> #include <stdio.h>
> int main () { printf("033[2J"); }
> 
> 3) alias cls='cat ~/.cls'
> where .cls contains just these 4 chars with no \n or spaces (ESC [ 2 J)

I don't think any of this will work: it assumes an ANSI screen driver 
(these strings are ANSI escape sequences to clear the screen).  Such a 
driver is a standard part of a Unix terminal driver, but most DJGPP 
environments don't have ANSI.SYS loaded.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019