- various bits of code referred to ${#COMP_WORDS} instead of ${#COMP_WORDS[@]}
This commit is contained in:
parent
c4e4bfb64f
commit
57437d5154
@ -1,6 +1,6 @@
|
||||
# bash_completion - some programmable completion functions for bash 2.05b
|
||||
#
|
||||
# $Id: bash_completion,v 1.565 2003/05/17 09:52:42 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.566 2003/05/17 09:55:11 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -1520,7 +1520,7 @@ _apt_get()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
for (( i=0; i < ${#COMP_WORDS}-1; i++ )); do
|
||||
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
|
||||
if [[ ${COMP_WORDS[i]} == @(install|remove|source|build-dep) ]]; then
|
||||
special=${COMP_WORDS[i]}
|
||||
fi
|
||||
@ -1602,7 +1602,7 @@ _apt_cache()
|
||||
|
||||
|
||||
if [ "$cur" != show ]; then
|
||||
for (( i=0; i < ${#COMP_WORDS}-1; i++ )); do
|
||||
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
|
||||
if [[ ${COMP_WORDS[i]} == @(add|depends|dotty|policy|show?(pkg|src)) ]]; then
|
||||
special=${COMP_WORDS[i]}
|
||||
fi
|
||||
@ -1681,7 +1681,7 @@ _aptitude()
|
||||
--display-format -w --width -f --with-recommends \
|
||||
--with-suggests --without-recommends --without-suggests'
|
||||
|
||||
for (( i=0; i < ${#COMP_WORDS}-1; i++ )); do
|
||||
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
|
||||
if [[ ${COMP_WORDS[i]} == @(install|hold|unhold|markauto|unmarkauto|dist-upgrade|download|purge|remove) ]]; then
|
||||
special=${COMP_WORDS[i]}
|
||||
fi
|
||||
@ -1745,7 +1745,7 @@ _apt_build()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
for (( i=0; i < ${#COMP_WORDS}-1; i++ )); do
|
||||
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
|
||||
if [[ ${COMP_WORDS[i]} == @(install|remove|source|info|clean) ]]; then
|
||||
special=${COMP_WORDS[i]}
|
||||
fi
|
||||
@ -3941,7 +3941,7 @@ _python()
|
||||
|
||||
|
||||
# if '-c' is already given, complete all kind of files.
|
||||
for (( i=0; i < ${#COMP_WORDS}-1; i++ )); do
|
||||
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
|
||||
if [[ ${COMP_WORDS[i]} == -c ]]; then
|
||||
_filedir
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user