Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333954
b: refs/heads/master
c: 35c2fde
h: refs/heads/master
v: v3
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Oct 2, 2012
1 parent a328227 commit 9cf3e5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1d668c3ffd38d611f8446615e8f797dcfdfc397
refs/heads/master: 35c2fde1155cc7225361edf43d8efd0aabd28a0c
12 changes: 9 additions & 3 deletions trunk/tools/perf/bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ _perf()

cmd=${COMP_WORDS[0]}

# List perf subcommands
# List perf subcommands or long options
if [ $COMP_CWORD -eq 1 ]; then
cmds=$($cmd --list-cmds)
COMPREPLY=( $( compgen -W '$cmds' -- "$cur" ) )
if [[ $cur == --* ]]; then
COMPREPLY=( $( compgen -W '--help --version \
--exec-path --html-path --paginate --no-pager \
--perf-dir --work-tree --debugfs-dir' -- "$cur" ) )
else
cmds=$($cmd --list-cmds)
COMPREPLY=( $( compgen -W '$cmds' -- "$cur" ) )
fi
# List possible events for -e option
elif [[ $prev == "-e" && "${COMP_WORDS[1]}" == @(record|stat|top) ]]; then
cmds=$($cmd list --raw-dump)
Expand Down

0 comments on commit 9cf3e5a

Please sign in to comment.