chiark / gitweb /
journalctl: properly honour -n when -f is passed, too
[elogind.git] / src / journal / journalctl.c
index 393601c7753938d018a8f7bdc084113badd9d569..52db7a9365185adfd94475f8342c444f1bd0c533 100644 (file)
@@ -57,7 +57,8 @@ static int help(void) {
                "  -f --follow         Follow journal\n"
                "  -n --lines=INTEGER  Journal entries to show\n"
                "     --no-tail        Show all lines, even in follow mode\n"
-               "  -o --output=STRING  Change journal output mode (short, verbose, export, json)\n"
+               "  -o --output=STRING  Change journal output mode (short, short-monotonic,\n"
+               "                      verbose, export, json, cat)\n"
                "     --new-id128      Generate a new 128 Bit id\n",
                program_invocation_short_name);
 
@@ -151,7 +152,7 @@ static int parse_argv(int argc, char *argv[]) {
                 }
         }
 
-        if (arg_follow && !arg_no_tail)
+        if (arg_follow && !arg_no_tail && arg_lines < 0)
                 arg_lines = 10;
 
         return 1;