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]
Other format: [Raw text]

RE: Control the cygwin terminal with escape sequences


Philippe,

First off, there is no need to send the message directly to me -- I read
the list.  Hence the "Reply-To".

Secondly, I used the exact line you quoted in your message
(perl -e 'print "\033[H\033[J"').  It worked.
The only difference I can see is that you use ActiveState's perl, whereas
I use the Cygwin native perl.  I'm not even going to ask why (yet).

Did you try piping the output of the perl command to "od -c"?  What did it
show?  What is the value of your CYGWIN variable?  Are you running this in
an xterm, an rxvt, or a command window?  Did you attach the output of
"cygcheck -s -v -r" as indicated in <http://cygwin.com/bugs.html>?  Please
provide the above information if you want people to be able to address
your problem.
	Igor

On Tue, 4 Mar 2003, Philippe Verdret wrote:

> Hi Igor,
>
> After updating cygwin on my pc, i try again:
>
> % perl -e 'system("stty raw -echo") ; print "\e[H\e[J"'
>
> which doesn't clear the screen.
> I use the ActiveState Perl, 5.8.0, bash 2.05b.0(8) and cygwin-1.3.20-1.
> Can you send me a command line which work? I will try it.
>
> Many thanks,
> Philippe
>
>
> -----Message d'origine-----
> De : Igor Pechtchanski [mailto:pechtcha at cs dot nyu dot edu]
> Envoye : lundi 3 mars 2003 16:52
> A : Philippe Verdret
> Cc : cygwin at cygwin dot com; cygwin-xfree at cygwin dot com
> Objet : Re: Control the cygwin terminal with escape sequences
>
>
> Redirecting to the correct list.  Please remove <cygwin-xfree at cygwin
> dot com> from replies.
>
> On Mon, 3 Mar 2003, Philippe Verdret wrote:
>
> > Hi,
> >
> > i want to control the cygwin terminal with escape sequences generated
> > by a Perl program.
> >
> > I can clear the screen with the echo command:
> > % echo -e "\033[H\033[J"
> >
> > but if i write a small inline perl program, i can't:
> >
> > % perl -e 'print "\033[H\033[J"'
> >
> > This doesn't work even if i put the screen in 'raw mode' without echo
> > (with system('stty -echo raw') in the perl program).
> >
> > Can you help me?
> >
> > Philippe
>
> And answering:
>
> Philippe,
>
> Works for me (using cygwin-1.3.20, bash-2.05b-8 and perl-5.6.1)...  You
> might want to report your problem properly, as described in
> <http://cygwin.com/bugs.html>.  Also, check that your perl one-liner
> outputs exactly the right sequence (by piping it to "od -c", for example).
> 	Igor

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha at cs dot nyu dot edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor at watson dot ibm dot com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune



--
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]