On Mon, Jun 20, 2011 at 12:09 AM, Aaron Sowry <[email protected]> wrote: > Hello, > > I've been wanting to discuss the default behaviour of systemctl, which I began > doing on fedora-devel (see [1] for start of thread) before it was pointed out > that systemd-devel is probably a more appropriate place for discussion. > > For those who can't be bothered reading through the original thread, I'll try > to > summarise: > > systemctl implements a lot of default behaviours which differ depending on > whether the output is tty or not. These include: > > - Automatically forking a pager and piping output to it if the output is tty. > This results in a number of problems, including RH #713707 which means that > the user will get no output on tty if there is no supported pager available. > --no-pager has been provided to disable this, and $SYSTEMD_PAGER is being > considered[2] as a workaround for non-supported pagers. > > - Column headers will be displayed on tty, but not otherwise. The assumption > here seems to be that output to non-tty channels is not destined for human > eyes. Currently, there is no way to force column headers on non-tty channels. > > - It has been suggested[3] that --full is implicit when outputting to non-tty > channels, however I am unable to reproduce this behaviour on Fedora 15. > Assuming that this will be the default behaviour though, we have a similar > problem to the point above, since there is currently no way to disable --full > on non-tty channels. > > As far as I see it, then, we have two options: > > 1) Continue providing workarounds such as $SYSTEMD_PAGER (and possibly > something > like --no-full and --force-headers) to mitigate behaviour imposed on users > by > developers; or > > 2) Stop making assumptions about what users want, and simply send output to > stdout in all cases unless the user specifies otherwise. > > In case it wasn't obvious, I am in favour of 2).
This greatly has my preference. I realize that the output of 'systemctl' is rather awkward for the average shell window, but there are so many other commands that output awkward amounts of data that piping though a pager no longer has any particular benefit. I also find myself just using --full | less, and I'd be poor if I had to pay someone for every time I have typed `systemctl | less` :) Auke _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
