aha! I figured out why journalctl's auto-pager bugs me when git's doesn't (and possible solution)

Matthew Miller mattdm at fedoraproject.org
Thu Oct 18 19:01:31 UTC 2012

On Thu, Oct 18, 2012 at 08:30:43PM +0200, Lennart Poettering wrote:
> >  journalctl  -n500 -f
> > (No space allowed after then -n.)
> The space thing is really annoying actually. glibc's getopt() insists on
> that for options such as "-n" that have an optional argument (i.e. which
> appear as "n::" in the opt string). I'd love to fix this if somebody has
> an idea to get getopt() to be nice to us here...

How about an option "--tail" (and maybe -t) which defaults to 10 (and turns
off the pager?), and then making the value to -n be non-optional? This fits
with the behavior of the tail command, where the number for n is also
non-optional if n is given.

Matthew Miller  ☁☁☁  Fedora Cloud Architect  ☁☁☁  <mattdm at fedoraproject.org>

More information about the devel mailing list