[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] Re: [PATCH] less applet
From:       Rob Landley <rob () landley ! net>
Date:       2005-05-24 5:09:20
Message-ID: 200505240109.20058.rob () landley ! net
[Download RAW message or body]

On Saturday 21 May 2005 05:10 am, Rob Sullivan wrote:
> OK guys, a small problem - when I'm done reading stuff into stdin if
> something has been piped or redirected to less, I can't do keyboard
> input anymore.

You've got to be tty aware to do less.

If you haven't got a tty, act like "cat".  If you have, you need to read from 
the TTY (and not the input stream) to get the page up/page down stuff.

I don't have personal experience with this, but if you don't want to look at 
how the traditional less implements this, you could always try opening the 
file returned by ttyname (when isatty(0) returns false) and seeing what you 
can read from it...

Rob
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic