The behaviour of systemctl.

Martin Dengler martin at martindengler.com
Fri Jun 17 21:41:14 UTC 2011


On Fri, Jun 17, 2011 at 10:16:35PM +0200, Aaron Sowry wrote:
> Hello,
> 
> I'd like to discuss the behaviour of systemctl. See RH bug 713567
> for context. To summarise:
> 
> - 'systemctl --all' pages by default when the output is to tty. This
>  consumes 50-60+ lines of potentially bug-prone code, and irks the
>  crap out of me as a system administrator. systemctl's jurisdiction
>  ends at stdout.

As you point out, git-log and --help do this too.  It's excellent.
Make it configurable if you must, but I'd be interested to think why
you think it's not always the useful thing to do.

> All of these peculiarities stem from poor UNIX programming
> practise. Do not try to make decisions for me as a user (especially
> not based on output channels), about how I want my output formatted.

grep has had --color=auto for almost ten years[1].

> No other Linux/UNIX tools make this assumption (with perhaps the
> exception of git-log et. al.)

git and grep alone are a pretty significant set of tools, and I bet
there are others.

I agree with the rest of your objections about inconsistencies and
mistaken error handling.  But the ship has sailed on stdout-is-tty
being an acceptable default driver of different output formatting.

Martin

1. http://cvs.savannah.gnu.org/viewvc/grep/grep/src/grep.c?view=diff&r1=1.69&r2=1.70




-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20110617/867963dd/attachment.bin 


More information about the devel mailing list