[PLUGIN] Lesslog -> run bzr log through less automatically

Martin Pool mbp at sourcefrog.net
Mon Dec 12 06:38:45 GMT 2005


On  9 Dec 2005, John Arbash Meinel <john at arbash-meinel.com> wrote:
> Michael Ellerman wrote:
> > Hiya,
> > 
> > I'm a lazy arse, so typing "bzr log | less" is just too much for me. Hence the 
> > "lesslog" plugin I just wrote, alias "ll" which does the less part for you.
> > 
> > It takes all the same options as regular log, in fact it's a subclass.
> > 
> > Don't be too lazy to branch it!
> > 
> > http://michael.ellerman.id.au/files/bzr/lesslog

I'd actually prefer a more sweepign change.  We already have some
commands marked as @displaycommand, meaning "produces lots of text
output".  These silently accept EPIPE, because they expect that the user
might run the output through a pager and quit it before everything's
come though.

So why not have these commands send their output through a pager when
these conditions hold:

 - the user has enabled this feature (or hasn't disabled it, depending
   on which is the default)

 - stdout is a tty

 - the pager can be started

I'm not sure if the unix idiom for starting a pager and piping output to
it can be done well on non-cygwin windows.  Perhaps we should there use
some kind of internal pager.

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051212/dc7d7f42/attachment.pgp 


More information about the bazaar mailing list