Remaining _init_completion() related changes missed in the first round.

This commit is contained in:
Ville Skyttä 2011-04-21 11:16:11 +03:00
parent 8048917968
commit 59e189e636
5 changed files with 13 additions and 17 deletions

View File

@ -43,10 +43,10 @@ complete -F _autoconf autoconf
have autoreconf || have autoheader && have autoreconf || have autoheader &&
_autoreconf() _autoreconf()
{ {
COMPREPLY=() local cur prev words cword
local cur prev split=false _init_completion || return
_get_comp_words_by_ref cur prev
local split=false
_split_longopt && split=true _split_longopt && split=true
case "$prev" in case "$prev" in
@ -84,10 +84,10 @@ complete -F _autoreconf autoreconf autoheader
have autoscan || have autoupdate && have autoscan || have autoupdate &&
_autoscan() _autoscan()
{ {
COMPREPLY=() local cur prev words cword
local cur prev split=false _init_completion || return
_get_comp_words_by_ref cur prev
local split=false
_split_longopt && split=true _split_longopt && split=true
case "$prev" in case "$prev" in

View File

@ -39,10 +39,10 @@ complete -F _automake automake automake-1.11
have aclocal && have aclocal &&
_aclocal() _aclocal()
{ {
COMPREPLY=() local cur prev words cword
local cur prev split=false _init_completion || return
_get_comp_words_by_ref cur prev
local split=false
_split_longopt && split=true _split_longopt && split=true
case "$prev" in case "$prev" in

View File

@ -7,7 +7,7 @@ _ifupdown()
local cur prev words cword local cur prev words cword
_init_completion || return _init_completion || return
if [ $COMP_CWORD -eq 1 ]; then if [ $cword -eq 1 ]; then
_configured_interfaces _configured_interfaces
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") ) COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") )
fi fi

View File

@ -8,10 +8,8 @@ _mailman_lists()
_list_lists() _list_lists()
{ {
local cur local cur prev words cword
_init_completion || return
COMPREPLY=()
_get_comp_words_by_ref cur
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--advertised --virtual-host-overview \ COMPREPLY=( $( compgen -W '--advertised --virtual-host-overview \
@ -359,8 +357,6 @@ _arch()
_init_completion || return _init_completion || return
local split=false local split=false
_get_comp_words_by_ref cur prev
_split_longopt && split=true _split_longopt && split=true
case $prev in case $prev in

View File

@ -28,7 +28,7 @@ _portinstall()
local -a COMPREPLY2 local -a COMPREPLY2
portsdir=${PORTSDIR:-/usr/ports}/ portsdir=${PORTSDIR:-/usr/ports}/
_get_comp_words_by_ref cur prev
# First try INDEX-5 # First try INDEX-5
indexfile=$portsdir/INDEX-5 indexfile=$portsdir/INDEX-5
# Then INDEX if INDEX-5 does not exist or system is not FreeBSD 5.x # Then INDEX if INDEX-5 does not exist or system is not FreeBSD 5.x