On Sun, Jan 02, 2011 at 08:24:02AM +0100, Tollef Fog Heen <tfh...@err.no> wrote:
> | +   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.

Not all distributions have such a command, while all distributions have
less packaged. What about making it a configure option, but let the
default be 'less'? Then Debian and other packages can use
--with-pager=pager or so.

> | +   else if (!*pager || !strcmp(pager, "cat"))
> | +           return;
> 
> Why special-casing cat?

To avoid launching an unnecessary process. 'systemctl | cat' and
'systemctl' is the same, except that the in previous case we do not
launch the pager.

> | +   setenv("LESS", "FRSX", 0);
> 
> Here you're unconditionally overriding LESS.

Hm, are you sure about this? setenv(3) writes:

If name does exist in the environment, then its value is changed to value if
overwrite  is  nonzero;  if  overwrite  is zero,  then  the  value of name is
not changed.

Thanks for the feedback,

Miklos

Attachment: pgpSOiLwRFs6O.pgp
Description: PGP signature

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to