40 lines
975 B
Bash
40 lines
975 B
Bash
# kcov completion -*- shell-script -*-
|
|
|
|
_kcov()
|
|
{
|
|
local cur prev words cword split
|
|
_init_completion -s || return
|
|
|
|
case "$prev" in
|
|
--pid|-p)
|
|
_pids
|
|
return 0
|
|
;;
|
|
--sort-type|-s)
|
|
COMPREPLY=( $( compgen -W 'filename percentage' -- "$cur" ) )
|
|
return 0
|
|
;;
|
|
--include-path|--exclude-path)
|
|
_filedir
|
|
return 0
|
|
;;
|
|
--limits|-l|--title|-t|--include-pattern|--exclude-pattern|\
|
|
--path-strip-level)
|
|
# argument required but no completions available
|
|
return 0
|
|
;;
|
|
esac
|
|
|
|
$split && return 0
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
|
|
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
|
return 0
|
|
fi
|
|
|
|
_filedir
|
|
} && complete -F _kcov kcov
|
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|