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

Michael Ellerman michael at ellerman.id.au
Mon Dec 12 07:28:21 GMT 2005


On Mon, 12 Dec 2005 00:38, Martin Pool wrote:
> 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.

I think that's an excellent idea. I'd argue it should be enabled by default, 
given a tty, people can set a config option to diable it if they want to.

Even if it only works on Unix and cygwin I think it's worth doing, that's a 
big chunk of potential users of the cli IMHO.

cheers

-- 
Michael Ellerman
IBM OzLabs

email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051212/05c5fec7/attachment.pgp 


More information about the bazaar mailing list