Files
linux-apfs/tools/perf/bash_completion
T

23 lines
342 B
Plaintext
Raw Normal View History

2012-08-09 16:31:51 +02:00
# perf completion
have perf &&
_perf()
{
local cur cmd
COMPREPLY=()
_get_comp_words_by_ref cur
cmd=${COMP_WORDS[0]}
# List perf subcommands
if [ $COMP_CWORD -eq 1 ]; then
cmds=$($cmd --list-cmds)
COMPREPLY=( $( compgen -W '$cmds' -- "$cur" ) )
# Fall down to list regular files
else
_filedir
fi
} &&
complete -F _perf perf