[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-101-g59e189e
Ville Skyttä
ville.skytta at iki.fi
Thu Apr 21 08:16:27 UTC 2011
The following commit has been merged in the master branch:
commit 59e189e636b476b14e970c49c1896d5f5962af8a
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Thu Apr 21 11:16:11 2011 +0300
Remaining _init_completion() related changes missed in the first round.
diff --git a/completions/autoconf b/completions/autoconf
index 0eb2ca6..10d80cf 100644
--- a/completions/autoconf
+++ b/completions/autoconf
@@ -43,10 +43,10 @@ complete -F _autoconf autoconf
have autoreconf || have autoheader &&
_autoreconf()
{
- COMPREPLY=()
- local cur prev split=false
- _get_comp_words_by_ref cur prev
+ local cur prev words cword
+ _init_completion || return
+ local split=false
_split_longopt && split=true
case "$prev" in
@@ -84,10 +84,10 @@ complete -F _autoreconf autoreconf autoheader
have autoscan || have autoupdate &&
_autoscan()
{
- COMPREPLY=()
- local cur prev split=false
- _get_comp_words_by_ref cur prev
+ local cur prev words cword
+ _init_completion || return
+ local split=false
_split_longopt && split=true
case "$prev" in
diff --git a/completions/automake b/completions/automake
index 1671d11..19a49f3 100644
--- a/completions/automake
+++ b/completions/automake
@@ -39,10 +39,10 @@ complete -F _automake automake automake-1.11
have aclocal &&
_aclocal()
{
- COMPREPLY=()
- local cur prev split=false
- _get_comp_words_by_ref cur prev
+ local cur prev words cword
+ _init_completion || return
+ local split=false
_split_longopt && split=true
case "$prev" in
diff --git a/completions/ifupdown b/completions/ifupdown
index 372fe7b..776279c 100644
--- a/completions/ifupdown
+++ b/completions/ifupdown
@@ -7,7 +7,7 @@ _ifupdown()
local cur prev words cword
_init_completion || return
- if [ $COMP_CWORD -eq 1 ]; then
+ if [ $cword -eq 1 ]; then
_configured_interfaces
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") )
fi
diff --git a/completions/mailman b/completions/mailman
index 62f5cb4..457ac33 100644
--- a/completions/mailman
+++ b/completions/mailman
@@ -8,10 +8,8 @@ _mailman_lists()
_list_lists()
{
- local cur
-
- COMPREPLY=()
- _get_comp_words_by_ref cur
+ local cur prev words cword
+ _init_completion || return
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--advertised --virtual-host-overview \
@@ -359,8 +357,6 @@ _arch()
_init_completion || return
local split=false
- _get_comp_words_by_ref cur prev
-
_split_longopt && split=true
case $prev in
diff --git a/completions/portupgrade b/completions/portupgrade
index be3be91..834b02b 100644
--- a/completions/portupgrade
+++ b/completions/portupgrade
@@ -28,7 +28,7 @@ _portinstall()
local -a COMPREPLY2
portsdir=${PORTSDIR:-/usr/ports}/
- _get_comp_words_by_ref cur prev
+
# First try INDEX-5
indexfile=$portsdir/INDEX-5
# Then INDEX if INDEX-5 does not exist or system is not FreeBSD 5.x
--
bash-completion
More information about the Bash-completion-commits
mailing list