arping: New completion.
parent
89b7923cb8
commit
2014d3b45d
|
@ -79,6 +79,36 @@ _tracepath()
|
|||
} &&
|
||||
complete -F _tracepath tracepath tracepath6
|
||||
|
||||
|
||||
have arping &&
|
||||
_arping()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
case $prev in
|
||||
-c|-w)
|
||||
return
|
||||
;;
|
||||
-I)
|
||||
_available_interfaces -a
|
||||
return
|
||||
;;
|
||||
-s)
|
||||
_ip_addresses
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $cur == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) )
|
||||
return
|
||||
fi
|
||||
|
||||
_known_hosts_real "$cur"
|
||||
} &&
|
||||
complete -F _arping arping
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
# sh-basic-offset: 4
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
assert_source_completions arping
|
|
@ -0,0 +1,21 @@
|
|||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "arping "
|
||||
sync_after_int
|
||||
|
||||
assert_complete_any "arping -"
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
Loading…
Reference in New Issue