Add reptyr completion.
This commit is contained in:
parent
c60896e0e1
commit
a6354b8107
1
CHANGES
1
CHANGES
@ -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.
|
||||
|
@ -127,6 +127,7 @@ bashcomp_DATA = abook \
|
||||
quota-tools \
|
||||
rcs \
|
||||
rdesktop \
|
||||
reptyr \
|
||||
reportbug \
|
||||
resolvconf \
|
||||
rfkill \
|
||||
|
32
completions/reptyr
Normal file
32
completions/reptyr
Normal 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
|
1
test/completion/reptyr.exp
Normal file
1
test/completion/reptyr.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions reptyr
|
22
test/lib/completions/reptyr.exp
Normal file
22
test/lib/completions/reptyr.exp
Normal 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
|
Loading…
x
Reference in New Issue
Block a user