05.02.09

bzr-pager Plugin

I like the feature in git, where commands that produce long output get piped to $PAGER.
This means, that if you do a "git diff" and its output will not fit into the current terminal window without scrolling, it will get piped to "less" by default, so that you can easily search and scroll in the output. Additionally (and that's the main point IMHO) it does not pollute your scrollback history (when you exit from your pager, the terminal will only display the call to the command, but not its output).

Luckily, there's a plugin for bzr, which provides the same functionality: bzr-pager

You can install it as follows:

mkdir -p ~/.bazaar/plugins && \
cd ~/.bazaar/plugins && \
bzr branch lp:bzr-pager pager

By Daniel in development, Ubuntu, musthaves2009-02-05 English (EU) Email

8 comments

Comment from: Adam [Visitor]
AdamAny plans for providing a tarball to ease packaging?
2009-02-05 @ 22:29
Comment from: Daniel [Member] Email
Adam, thanks for your interest.
You may want to file a bug/wish at https://bugs.launchpad.net/bzr-pager.
Otherwise, you can extract it from the bazaar repo quite easliy.
What do you want it for?
2009-02-05 @ 22:41
Comment from: Adam [Visitor]
AdamI maintain the bzr packages for MacPorts and its just a lot easier packaging if theres an upstream tarball. I'll file a ticket.
2009-02-05 @ 23:13
Comment from: Bryan Forbes [Visitor]
Bryan ForbesYou're my hero! Thank you for this invaluable plugin.
2009-02-06 @ 01:55
Comment from: Chris Conway [Visitor]
Chris ConwayYou also need to rename the branch directory, or you'll get the error "Unable to load 'bzr-pager' in '~/.bazaar/plugins' as a plugin because the file path isn't a valid module name".
2009-02-06 @ 06:14
Comment from: Daniel [Member] Email
Thanks, Chris.
I've updated the code in the post (you can give "bzr branch" the directory to create).
2009-02-09 @ 20:45
Comment from: mok0 [Visitor]
mok0I tried installing bzr-pager like you suggest, but bzr complains about it and suggest it should be renamed to "pager"??
2009-02-10 @ 10:20
Comment from: RainCT [Visitor]
RainCTThanks! Since I've started using git this is something I've really missed in bzr (I was already getting used to appending "| less" everywhere).
2009-07-10 @ 23:50

Leave a comment


Your email address will not be revealed on this site.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)
You can just use your OpenID to provide your name, e-mail and url.
Seitenleiste