Re: F20 System Wide Change: No Default Syslog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Once upon a time, John.Florian@xxxxxxxx <John.Florian@xxxxxxxx> said:
> While I'm no more important than the next guy, I'll defend the auto-pager 
> feature of both git and journalctl.  I love it, in fact.  I'm no stranger 
> to very long pipelines and sub-shells but I see nothing but benefit in not 
> having to add "| less" routinely to things that are UI in nature.

My primary objection is that I don't like things that have differing
behavior between a TTY and a pipe.  One problem is if you are writing a
script to process output from something, you'll probably run the command
in a TTY to check the output, but you'll get different results.

There are not many programs that have such TTY/pipe behavior.  The only
ones that come to mind are "ps" (where output is truncated at screen
width) and "ls" (where "--color=tty" changes between TTY and pipe).  The
ls behavior makes sense (and doesn't change the information displayed,
formatting, etc.); the "ps" behavior is annoying.  I guess "man" has
similar auto-pager behavior to systemctl/journalctl (although IMHO man
is a different type of thing, since it is a documentation reader).

We already have pipes, and anyone that knows how to use a Unix shell
knows how to use them.  IMHO it is extra complication (and code
duplication) for programs to change behavior between a TTY and a pipe,
unless there are specific things that can't easily be accomplished with
a simple pipe (such as "ls --color=tty").  Pagination, truncation, etc.
are easy using pipes, and should not be done in regular programs.

-- 
Chris Adams <linux@xxxxxxxxxxx>
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux