fix iptables - it no longer worked at all, because $prev wasn't set

This commit is contained in:
ianmacd 2002-01-06 18:11:12 +00:00
parent 1f2e4f47e6
commit 8aa9afba1d

View File

@ -2,7 +2,7 @@
#
# <![CDATA[
#
# $Id: bash_completion,v 1.48 2002/01/06 04:21:04 ianmacd Exp $
# $Id: bash_completion,v 1.49 2002/01/06 19:11:12 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -1213,10 +1213,11 @@ complete -F _tar -o default tar
have iptables &&
_iptables()
{
local cur
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
[ "$prev" = -t ] && COMPREPLY=( $( compgen -W 'nat filter mangle' $cur ) )
}