prelink: New completion.
This commit is contained in:
parent
2014d3b45d
commit
e1a3492261
@ -134,6 +134,7 @@ bashcomp_DATA = abook \
|
|||||||
postfix \
|
postfix \
|
||||||
postgresql \
|
postgresql \
|
||||||
povray \
|
povray \
|
||||||
|
prelink \
|
||||||
procps \
|
procps \
|
||||||
protoc \
|
protoc \
|
||||||
puppet \
|
puppet \
|
||||||
|
48
completions/prelink
Normal file
48
completions/prelink
Normal 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
|
1
test/completion/prelink.exp
Normal file
1
test/completion/prelink.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions prelink
|
21
test/lib/completions/prelink.exp
Normal file
21
test/lib/completions/prelink.exp
Normal 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
|
Loading…
x
Reference in New Issue
Block a user