From: Zac Medico Date: Thu, 29 Sep 2011 00:36:08 +0000 (-0700) Subject: dispatch-conf: tweak pager basename comparison X-Git-Tag: v2.2.0_alpha60~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0b12491de238eb6fb66a42019d8c83c59f0ad684;p=portage.git dispatch-conf: tweak pager basename comparison --- diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 55d7f13d7..9f245d571 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -104,12 +104,13 @@ class dispatch: if pager is None or not cmd_var_is_valid(pager): pager = "cat" - if os.path.basename(pager) == "less": + pager_basename = os.path.basename(portage.util.shlex_split(pager)[0]) + if pager_basename == "less": less_opts = self.options.get("less-opts") if less_opts is not None and less_opts.strip(): pager += " " + less_opts - if os.path.basename(portage.util.shlex_split(pager)[0]) == "cat": + if pager_basename == "cat": pager = "" else: pager = " | " + pager