Browse Source

perf completion: Complete 'perf kvm'

Currently, there is no way to enumerate the subcommands under 'perf
kvm', so hardcode them.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Link: http://lkml.kernel.org/r/1386758056-24618-2-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Ramkumar Ramachandra 11 years ago
parent
commit
8f2f5ada71
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tools/perf/perf-completion.sh

+ 4 - 0
tools/perf/perf-completion.sh

@@ -121,6 +121,10 @@ __perf_main ()
 	elif [[ $prev == "-e" && "${words[1]}" == @(record|stat|top) ]]; then
 	elif [[ $prev == "-e" && "${words[1]}" == @(record|stat|top) ]]; then
 		evts=$($cmd list --raw-dump)
 		evts=$($cmd list --raw-dump)
 		__perfcomp_colon "$evts" "$cur"
 		__perfcomp_colon "$evts" "$cur"
+	# List subcommands for 'perf kvm'
+	elif [[ $prev == "kvm" ]]; then
+		subcmds="top record report diff buildid-list stat"
+		__perfcomp_colon "$subcmds" "$cur"
 	# List long option names
 	# List long option names
 	elif [[ $cur == --* ]];  then
 	elif [[ $cur == --* ]];  then
 		subcmd=${words[1]}
 		subcmd=${words[1]}