This implements bash completion for perf subcommands such
as record, report, script, probe, etc...
Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
---
tools/perf/Makefile | 1 +
tools/perf/bash_completion | 20 +++++++++++++
tools/perf/perf.c | 69 +++++++++++++++++++++++++-------------------
3 files changed, 60 insertions(+), 30 deletions(-)
create mode 100644 tools/perf/bash_completion
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 35655c3..4000d72 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -951,6 +951,7 @@ install: all
$(INSTALL) scripts/python/Perf-Trace-Util/lib/Perf/Trace/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/Perf-Trace-Util/lib/Perf/Trace'
$(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'
$(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'
+ $(INSTALL) -m 755 bash_completion /etc/bash_completion.d/perf