Re: [PATCH 3/4] perf tools: Setup pager when printing usage and help

From: Ingo Molnar
Date: Sun Oct 25 2015 - 05:04:32 EST



* Namhyung Kim <namhyung@xxxxxxxxxx> wrote:

> It's annoying to see error or help message when command has many options like in
> perf record, report or top. [...]

That's indeed so.

> [...] So setup pager when print parser error or help message - it should be OK
> since no UI is enabled at the parsing time. The usage_with_options() already
> disables it by calling exit_browser() anyway.

So I wanted to write that this has a disadvantage as well, that the pager disrupts
the regular 'timeline', 'append-only' visual flow of a regular shell workflow.

But then I tried your patches, and for short outputs (such as 'perf stat -h') the
pager is not activated, while for longer output (such as 'perf report -h') it's
activated.

That's very intuitive:

Acked-by: Ingo Molnar <mingo@xxxxxxxxxx>

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/