From: Yunlong Song Date: Wed, 18 Mar 2015 13:35:54 +0000 (+0800) Subject: perf tools: Add the bash completion for listing subsubcommands of perf script X-Git-Tag: v4.1-rc1~143^2~59^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=40cae2b779f2826f3d82674027299332c2007716;p=karo-tx-linux.git perf tools: Add the bash completion for listing subsubcommands of perf script The bash completion does not support listing subsubcommands for 'perf script ', so fix it. Example: Before this patch: $ perf script $ As shown above, the subsubcommands of perf script does not come out. After this patch: $ perf script record report As shown above, the subsubcommands of perf script can come out now. Signed-off-by: Yunlong Song Tested-by: Arnaldo Carvalho de Melo Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1426685758-25488-10-git-send-email-yunlong.song@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index c7e6750923ef..f2a348b57b8f 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1572,7 +1572,8 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) "Show the mmap events"), OPT_END() }; - const char * const script_usage[] = { + const char * const script_subcommands[] = { "record", "report", NULL }; + const char *script_usage[] = { "perf script []", "perf script [] record