delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/14/12:18:14

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <49BBE900.4080905@gmail.com>
Date: Sat, 14 Mar 2009 17:27:28 +0000
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Clearing the Cygwin console
References: <gpft5l$8b7$1 AT ger DOT gmane DOT org> <416096c60903140238o2e7b3f2dy707686184a9c6153 AT mail DOT gmail DOT com> <49BBE008 DOT 8000602 AT veritech DOT com>
In-Reply-To: <49BBE008.8000602@veritech.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Lee D. Rothstein wrote:
> Andy Koppe wrote:
>>> on Linux/UNIX systems with the command 'clear' the console content
>>> usually
>>> can be "flushed", on Windows with 'cls'.
>>> None of these commands worked with Cygwin. If I enter 'clear', the
>>> message
>>>  bash: clear: command not found
>>> is returned.
>>>
>>> How can a console used with Cygwin be cleared?
>>
>> Ctrl+L. Works in all terminals.
> 
> clear.exe is available in the ncurses package.
> 
> As Andy said ^-l works.
> 
> However, with both clear and ^-l, the scroll buffer is not cleared which
> makes it use with text-based debugging
> rather limited. That's one reason the alternate screen option on 'rxvt',
> and 'xterm' is useful.

  For gui consoles, use

    alias cls='echo -e "\033c"'

which does clear the scrollback buffer.

    cheers,
      DaveK

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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