[Bash-completion-commits] [SCM] bash-completion branch, master, updated. efaae3f8b958b14dd6fa5b7f07ea13375ddc3737
Ville Skyttä
ville.skytta at iki.fi
Wed Jun 9 20:15:44 UTC 2010
The following commit has been merged in the master branch:
commit cdbfd8e2246eb327dd20eaaaf78a343de87b6dc3
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Wed Jun 9 22:53:43 2010 +0300
Split ifup and ifdown completions into contrib/ifupdown.
diff --git a/CHANGES b/CHANGES
index 639e145..33e4e59 100644
--- a/CHANGES
+++ b/CHANGES
@@ -61,6 +61,7 @@ bash-completion (2.x)
* Split kill, look, and renice completions into contrib/util-linux.
* Split killall, pkill, pgrep and related completions into contrib/procps.
* Split ipsec completion into contrib/ipsec.
+ * Split ifup and ifdown completions into contrib/ifupdown.
* Do basic HTML file completion with Firefox and Chrome and friends,
and Epiphany.
* Do basic diff/patch completion with cdiff and kompare.
diff --git a/Makefile.am b/Makefile.am
index c778054..ed1ef8d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,6 +55,7 @@ bashcomp_DATA = contrib/abook \
contrib/heimdal \
contrib/hping2 \
contrib/iconv \
+ contrib/ifupdown \
contrib/imagemagick \
contrib/info \
contrib/iptables \
diff --git a/bash_completion b/bash_completion
index e178e0f..1573d03 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1082,26 +1082,6 @@ _dvd_devices()
patch configure build install reinstall deinstall clean clean-depends \
kernel buildworld' make
-# Red Hat & Debian GNU/Linux if{up,down} completion
-#
-[ $USERLAND = GNU ] && { have ifup || have ifdown; } &&
-_ifupdown()
-{
- local cur
-
- COMPREPLY=()
- cur=`_get_cword`
-
- if [ $COMP_CWORD -eq 1 ]; then
- _configured_interfaces
- COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") )
- fi
-
- return 0
-} &&
-complete -F _ifupdown ifup ifdown
-[ $USERLAND = GNU ] && have ifstatus && complete -F _ifupdown ifstatus
-
# This function provides simple user at host completion
#
_user_at_host() {
diff --git a/contrib/ifupdown b/contrib/ifupdown
new file mode 100644
index 0000000..4157179
--- /dev/null
+++ b/contrib/ifupdown
@@ -0,0 +1,27 @@
+# Red Hat & Debian GNU/Linux if{up,down} completion
+#
+[ $USERLAND = GNU ] && { have ifup || have ifdown; } &&
+_ifupdown()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ _configured_interfaces
+ COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") )
+ fi
+
+ return 0
+} &&
+complete -F _ifupdown ifup ifdown
+[ $USERLAND = GNU ] && have ifstatus && complete -F _ifupdown ifstatus
+
+# 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
--
bash-completion
More information about the Bash-completion-commits
mailing list