diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-12 23:01:10 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-12 23:01:10 +0300 |
commit | 156656c16d4302d059221a06eb7c1bd460e41fe9 (patch) | |
tree | 87b9edeaab27b4d7a5ae70644a5b7803c3cc7c25 /completions/arping | |
parent | d3d6476f6c24cebb89e4712477e568dd5f5fbca8 (diff) | |
download | bash-completion-156656c16d4302d059221a06eb7c1bd460e41fe9.tar.gz |
Split/rename many completions into per-command files.
Diffstat (limited to 'completions/arping')
-rw-r--r-- | completions/arping | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/completions/arping b/completions/arping new file mode 100644 index 00000000..ea35bbde --- /dev/null +++ b/completions/arping @@ -0,0 +1,37 @@ +# arping(8) completion + +_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 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh |