chrpath: New completion.

This commit is contained in:
Ville Skyttä 2011-09-29 23:11:31 +03:00
parent e1a3492261
commit b9a5f508e2
4 changed files with 56 additions and 0 deletions

View File

@ -21,6 +21,7 @@ bashcomp_DATA = abook \
cardctl \ cardctl \
cfengine \ cfengine \
chkconfig \ chkconfig \
chrpath \
chsh \ chsh \
cksfv \ cksfv \
clisp \ clisp \

33
completions/chrpath Normal file
View File

@ -0,0 +1,33 @@
have chrpath || return
_chrpath()
{
local cur prev words cword
_init_completion || return
case $prev in
-v|--version|-h|--help)
return
;;
-r|--replace)
_filedir -d
return
;;
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
return
fi
_filedir
} &&
complete -F _chrpath chrpath
# 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 chrpath

View File

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