1 |
commit: 0b12491de238eb6fb66a42019d8c83c59f0ad684 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 29 00:36:08 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 29 00:36:08 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0b12491d |
7 |
|
8 |
dispatch-conf: tweak pager basename comparison |
9 |
|
10 |
--- |
11 |
bin/dispatch-conf | 5 +++-- |
12 |
1 files changed, 3 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/bin/dispatch-conf b/bin/dispatch-conf |
15 |
index 55d7f13..9f245d5 100755 |
16 |
--- a/bin/dispatch-conf |
17 |
+++ b/bin/dispatch-conf |
18 |
@@ -104,12 +104,13 @@ class dispatch: |
19 |
if pager is None or not cmd_var_is_valid(pager): |
20 |
pager = "cat" |
21 |
|
22 |
- if os.path.basename(pager) == "less": |
23 |
+ pager_basename = os.path.basename(portage.util.shlex_split(pager)[0]) |
24 |
+ if pager_basename == "less": |
25 |
less_opts = self.options.get("less-opts") |
26 |
if less_opts is not None and less_opts.strip(): |
27 |
pager += " " + less_opts |
28 |
|
29 |
- if os.path.basename(portage.util.shlex_split(pager)[0]) == "cat": |
30 |
+ if pager_basename == "cat": |
31 |
pager = "" |
32 |
else: |
33 |
pager = " | " + pager |