32 lines
566 B
Plaintext
Raw Normal View History

2009-09-14 21:48:03 +02:00
# bash completion for resolvconf
have resolvconf &&
_resolvconf()
{
2009-10-04 19:42:50 +02:00
local cur command
2009-09-14 21:48:03 +02:00
2009-10-04 19:42:50 +02:00
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
2009-09-14 21:48:03 +02:00
2009-10-04 19:42:50 +02:00
case $prev in
-a|-d)
2009-10-04 19:42:50 +02:00
_available_interfaces
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-a -d -u' -- "$cur" ) )
fi
2009-09-14 21:48:03 +02:00
} &&
complete -F _resolvconf resolvconf
# Local variables:
# mode: shell-script
2009-10-04 19:42:50 +02:00
# sh-basic-offset: 4
# sh-indent-comment: t
2009-10-04 19:42:50 +02:00
# indent-tabs-mode: nil
# End:
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh