Merge lp:~nobuto/bikeshed/lp677049 into lp:bikeshed

Proposed by Nobuto Murata
Status: Merged
Merged at revision: 58
Proposed branch: lp:~nobuto/bikeshed/lp677049
Merge into: lp:bikeshed
Diff against target: 31 lines (+8/-3)
2 files modified
bzrp (+4/-1)
debian/changelog (+4/-2)
To merge this branch: bzr merge lp:~nobuto/bikeshed/lp677049
Reviewer Review Type Date Requested Status
bikeshed Pending
Review via email: mp+41189@code.launchpad.net

Description of the change

bzrp passes "-F -R -X" options to pager.
That causes error with pagers which don't support those options.

I added test line for getting which pager is set.
And I made bzrp passing options only if less is set.

To get which pager is set, /etc/alternatives/pager is tested.
I think using "update-alternatives" like the line below is more general, but non-Debian systems don't seems to support "update-alternatives --query" command. So I get directly from /etc/alternatives.

$(update-alternatives --query pager | grep "Value:" | awk '{print $2}')

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrp'
--- bzrp 2010-10-21 17:06:48 +0000
+++ bzrp 2010-11-18 16:19:16 +0000
@@ -21,7 +21,10 @@
2121
22cmd=$(shift)22cmd=$(shift)
2323
24opts="-F -R -X"24pager=$(readlink /etc/alternatives/pager)
25if [ $pager = /bin/less ]; then
26 opts="-F -R -X"
27fi
25# NOTE: The $opts are specific to vi-compatible pagers, like 'less'.28# NOTE: The $opts are specific to vi-compatible pagers, like 'less'.
26# It would be nice to have a better way of detecting this.29# It would be nice to have a better way of detecting this.
27# Currently, these support:30# Currently, these support:
2831
=== modified file 'debian/changelog'
--- debian/changelog 2010-11-09 23:45:59 +0000
+++ debian/changelog 2010-11-18 16:19:16 +0000
@@ -1,8 +1,10 @@
1bikeshed (1.6) unreleased; urgency=low1bikeshed (1.6) unreleased; urgency=low
22
3 * UNRELEASED3 [ Nobuto MURATA ]
4 * bzrp: avoid passing unsupported options to pager other than less,
5 LP: #677049
46
5 -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 09 Nov 2010 17:45:59 -06007 -- Nobuto MURATA <nobuto@nobuto-murata.org> Fri, 19 Nov 2010 00:52:40 +0900
68
7bikeshed (1.5-0ubuntu1) natty; urgency=low9bikeshed (1.5-0ubuntu1) natty; urgency=low
810

Subscribers

People subscribed via source and target branches