Add reptyr completion.

This commit is contained in:
Ville Skyttä 2011-03-12 12:04:02 +02:00
parent c60896e0e1
commit a6354b8107
5 changed files with 57 additions and 0 deletions

View File

@ -1,6 +1,7 @@
bash-completion (2.x)
[ Ville Skyttä ]
* Add reptyr completion.
* Improve aspell, gendiff, and smartctl completions.
* Try harder to find the correct perl executable to run the perl helper with.
* Drop rpm query support for rpm < 4.1.

View File

@ -127,6 +127,7 @@ bashcomp_DATA = abook \
quota-tools \
rcs \
rdesktop \
reptyr \
reportbug \
resolvconf \
rfkill \

32
completions/reptyr Normal file
View File

@ -0,0 +1,32 @@
# bash completion for reptyr(1)
have reptyr &&
_reptyr()
{
local cur prev
COMPREPLY=()
_get_comp_words_by_ref cur prev
case $prev in
-l)
return 0
;;
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '-l -s' -- "$cur" ) )
return 0
fi
[[ $prev != +([0-9]) ]] && _pids
} &&
complete -F _reptyr reptyr
# 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 reptyr

View File

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