29 lines
608 B
Plaintext
Raw Normal View History

# bash completion for dhclient -*- shell-script -*-
2009-05-17 22:07:58 +02:00
2011-04-04 22:14:39 +03:00
_dhclient()
2009-05-17 22:07:58 +02:00
{
local cur prev words cword
_init_completion || return
2009-05-17 22:07:58 +02:00
case $prev in
-cf|-lf|-pf|-sf)
2009-10-04 19:42:50 +02:00
_filedir
return 0
;;
-s)
_known_hosts_real "$cur"
return 0
;;
esac
2009-05-17 22:07:58 +02:00
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-p -d -q -1 -r -lf -pf -cf -sf -s -g -n -nw
-w' -- "$cur" ) )
2009-10-04 19:42:50 +02:00
else
_available_interfaces
fi
2009-05-17 22:07:58 +02:00
} &&
complete -F _dhclient dhclient
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh