From 40cae2b779f2826f3d82674027299332c2007716 Mon Sep 17 00:00:00 2001 From: Yunlong Song Date: Wed, 18 Mar 2015 21:35:54 +0800 Subject: [PATCH] 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 --- tools/perf/builtin-script.c | 5 +++-- tools/perf/perf-completion.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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