summaryrefslogtreecommitdiff
path: root/completions/resolvconf
diff options
context:
space:
mode:
Diffstat (limited to 'completions/resolvconf')
-rw-r--r--completions/resolvconf30
1 files changed, 30 insertions, 0 deletions
diff --git a/completions/resolvconf b/completions/resolvconf
new file mode 100644
index 00000000..9773696d
--- /dev/null
+++ b/completions/resolvconf
@@ -0,0 +1,30 @@
+# bash completion for resolvconf
+
+have resolvconf &&
+_resolvconf()
+{
+ local cur command
+
+ COMPREPLY=()
+ _get_comp_words_by_ref cur prev
+
+ case $prev in
+ -a|-d)
+ _available_interfaces
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a -d -u' -- "$cur" ) )
+ fi
+} &&
+complete -F _resolvconf resolvconf
+
+# 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