Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1253865
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] perf tools: Setup pager when printing usage and help |
| Date | 2015-10-22 16:30 +0200 |
| Message-ID | <qmp2q-56v-19@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
It's annoying to see error or help message when command has many options like in perf record, report or top. 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. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Chandler Carruth <chandlerc@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Stephane Eranian <eranian@google.com> Cc: Wang Nan <wangnan0@huawei.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> --- tools/perf/util/parse-options.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c index 8aa7922397a9..388d385df5ad 100644 --- a/tools/perf/util/parse-options.c +++ b/tools/perf/util/parse-options.c @@ -648,6 +648,8 @@ int usage_with_options_internal(const char * const *usagestr, if (!usagestr) return PARSE_OPT_HELP; + setup_pager(); + fprintf(stderr, "\n Usage: %s\n", *usagestr++); while (*usagestr && **usagestr) fprintf(stderr, " or: %s\n", *usagestr++); -- 2.6.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/2] perf tools: Setup pager when printing usage and help Namhyung Kim <namhyung@kernel.org> - 2015-10-22 16:30 +0200
[PATCH 2/2] perf tools: Improve call graph documents and help messages Namhyung Kim <namhyung@kernel.org> - 2015-10-22 16:30 +0200
Re: [PATCH 2/2] perf tools: Improve call graph documents and help messages Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-22 16:50 +0200
Re: [PATCH 2/2] perf tools: Improve call graph documents and help messages Namhyung Kim <namhyung@kernel.org> - 2015-10-22 18:10 +0200
Re: [PATCH 2/2] perf tools: Improve call graph documents and help messages Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-22 18:30 +0200
Re: [PATCH 2/2] perf tools: Improve call graph documents and help messages Frederic Weisbecker <fweisbec@gmail.com> - 2015-10-22 18:30 +0200
Re: [PATCH 2/2] perf tools: Improve call graph documents and help messages Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-22 20:40 +0200
[tip:perf/core] perf tools: Improve call graph documents and help messages tip-bot for Namhyung Kim <tipbot@zytor.com> - 2015-10-23 10:40 +0200
Re: [tip:perf/core] perf tools: Improve call graph documents and help messages Ingo Molnar <mingo@kernel.org> - 2015-10-23 11:10 +0200
Re: [tip:perf/core] perf tools: Improve call graph documents and help messages Namhyung Kim <namhyung@kernel.org> - 2015-10-24 18:00 +0200
Re: [tip:perf/core] perf tools: Improve call graph documents and help messages Ingo Molnar <mingo@kernel.org> - 2015-10-25 10:20 +0100
Re: [PATCH 1/2] perf tools: Setup pager when printing usage and help Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-22 16:50 +0200
Re: [PATCH 1/2] perf tools: Setup pager when printing usage and help Namhyung Kim <namhyung@kernel.org> - 2015-10-22 18:00 +0200
csiph-web