prelink: New completion.

This commit is contained in:
Ville Skyttä 2011-09-29 22:57:59 +03:00
parent 2014d3b45d
commit e1a3492261
4 changed files with 71 additions and 0 deletions

View File

@ -134,6 +134,7 @@ bashcomp_DATA = abook \
postfix \
postgresql \
povray \
prelink \
procps \
protoc \
puppet \

48
completions/prelink Normal file
View File

@ -0,0 +1,48 @@
have prelink || return
_prelink()
{
local cur prev words cword split
_init_completion -s || return
case $prev in
-'?'|--help|--usage|-V|--version|-r|--reloc-only)
return
;;
-b|--black-list|--dynamic-linker|--undo-output)
_filedir
return
;;
-c|--config-file)
_filedir conf
return
;;
-C|--cache)
_filedir cache
return
;;
--ld-library-path)
_filedir -d
return
;;
esac
$split && return
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
return
fi
_filedir
} &&
complete -F _prelink prelink
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh

View File

@ -0,0 +1 @@
assert_source_completions prelink

View File

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