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

Proposed by Nobuto Murata on 2010-11-18
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 2010-11-18 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
1=== modified file 'bzrp'
2--- bzrp 2010-10-21 17:06:48 +0000
3+++ bzrp 2010-11-18 16:19:16 +0000
4@@ -21,7 +21,10 @@
5
6 cmd=$(shift)
7
8-opts="-F -R -X"
9+pager=$(readlink /etc/alternatives/pager)
10+if [ $pager = /bin/less ]; then
11+ opts="-F -R -X"
12+fi
13 # NOTE: The $opts are specific to vi-compatible pagers, like 'less'.
14 # It would be nice to have a better way of detecting this.
15 # Currently, these support:
16
17=== modified file 'debian/changelog'
18--- debian/changelog 2010-11-09 23:45:59 +0000
19+++ debian/changelog 2010-11-18 16:19:16 +0000
20@@ -1,8 +1,10 @@
21 bikeshed (1.6) unreleased; urgency=low
22
23- * UNRELEASED
24+ [ Nobuto MURATA ]
25+ * bzrp: avoid passing unsupported options to pager other than less,
26+ LP: #677049
27
28- -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 09 Nov 2010 17:45:59 -0600
29+ -- Nobuto MURATA <nobuto@nobuto-murata.org> Fri, 19 Nov 2010 00:52:40 +0900
30
31 bikeshed (1.5-0ubuntu1) natty; urgency=low
32

Subscribers

People subscribed via source and target branches