Re: packages: adapter - use less only if terminal is to short

2009-12-01 Thread Tomasz Pala
On Tue, Dec 01, 2009 at 11:15:39 +0100, Przemyslaw Iskra wrote: > I personally consider very annoying not being able to see what I'm > accepting -- there are terminals, like gnome-terminal, which switch > buffers for normal and ncurses-based operation, so after I exit less, or > it exists for me (

Re: packages: adapter - use less only if terminal is to short

2009-12-01 Thread Przemyslaw Iskra
On Tue, Dec 01, 2009 at 10:00:43AM +0200, Elan Ruusamäe wrote: > On Tuesday 01 December 2009 04:39:48 sparky wrote: > resize is x11/xorg dep, and can be missing on some systems. > > use stty size instead: > set -- $(stty size) > > > +   if [ $l -gt $LINES ]; then > > +   diffcol

Re: packages: adapter - use less only if terminal is to short

2009-12-01 Thread Tomasz Pala
On Tue, Dec 01, 2009 at 10:00:43 +0200, Elan Ruusamäe wrote: >> +   diffcol $1 | less -r >> +   else >> +   diffcol $1 > > why you just don't set "less -E" ? less -FR -- Tomasz Pala ___ pld-devel-en mailing list pld-devel

Re: packages: adapter - use less only if terminal is to short

2009-12-01 Thread Elan Ruusamäe
On Tuesday 01 December 2009 04:39:48 sparky wrote: > +showdiff() > +{ > +   l=$(cat $1 | wc -l) local $l maybe? > +   eval $(resize) # get terminal size resize is x11/xorg dep, and can be missing on some systems. use stty size instead: set -- $(stty size) > +   if [ $l -gt $LINES ];