[systemd-devel] [PATCH] systemctl: implement auto-pager a la git
Tollef Fog Heen
tfheen at err.no
Sat Jan 1 23:24:02 PST 2011
]] Miklos Vajna
Hi,
| I hope the subjects describes the patch enough - though I would like to
| point out one detail. I guess there can be great flames about the
| default value of LESS if it's unset - I took FRSX as that's what git
| uses right now.
You're not using a default value of LESS, you're always overriding.
| + if (!pager)
| + pager = "less";
Doesn't other distributions have sensible-pager(1) or pager(1)? Also,
at least on Debian, less(1) isn't in the base distribution, while
more(1) comes from util-linux so is always around.
| + else if (!*pager || !strcmp(pager, "cat"))
| + return;
Why special-casing cat?
| + setenv("LESS", "FRSX", 0);
Here you're unconditionally overriding LESS.
Regards.
--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are
More information about the systemd-devel
mailing list