diff options
Diffstat (limited to 'tools/perf/bash_completion')
-rw-r--r-- | tools/perf/bash_completion | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/bash_completion b/tools/perf/bash_completion index 9a31fa5ed2a9..1958fa539d0f 100644 --- a/tools/perf/bash_completion +++ b/tools/perf/bash_completion @@ -6,7 +6,7 @@ _perf() local cur cmd COMPREPLY=() - _get_comp_words_by_ref cur + _get_comp_words_by_ref cur prev cmd=${COMP_WORDS[0]} @@ -14,6 +14,10 @@ _perf() if [ $COMP_CWORD -eq 1 ]; then cmds=$($cmd --list-cmds) COMPREPLY=( $( compgen -W '$cmds' -- "$cur" ) ) + # List possible events for -e option + elif [[ $prev == "-e" && "${COMP_WORDS[1]}" == @(record|stat|top) ]]; then + cmds=$($cmd list --raw-dump) + COMPREPLY=( $( compgen -W '$cmds' -- "$cur" ) ) # Fall down to list regular files else _filedir |