ccache: New completion.

This commit is contained in:
Ville Skyttä 2011-11-20 17:54:36 +02:00
parent f0283e1c1b
commit ed17034974
4 changed files with 46 additions and 0 deletions

View File

@ -28,6 +28,7 @@ bashcomp_DATA = a2x \
cal \
cancel \
cardctl \
ccache \
cfagent \
cfrun \
chage \

26
completions/ccache Normal file
View File

@ -0,0 +1,26 @@
# ccache(1) completion -*- shell-script -*-
_ccache()
{
local cur prev words cword split
_init_completion -s || return
if [[ $COMP_CWORD -eq 1 && ${COMP_WORDS[COMP_CWORD]} != -* ]]; then
_command_offset 1
return
fi
case $prev in
-h|--help|-V|--version|-F|--max-files|-M|--max-size)
return
;;
esac
$split && return
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
} &&
complete -F _ccache ccache
# ex: ts=4 sw=4 et filetype=sh

View File

@ -0,0 +1 @@
assert_source_completions ccache

View File

@ -0,0 +1,18 @@
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
assert_complete_any "ccache -"
sync_after_int
teardown