Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37433491
en ru br
Репозитории ALT
S:2.11-alt3.git.157.g59d2322e
5.1: 20060301-alt06
4.1: 20060301-alt05
4.0: 20060301-alt03
3.0: 20050712-alt01
www.altlinux.org/Changes

Группа :: Интерпретаторы команд
Пакет: bash-completion

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: bash-completion-alt-iptables.patch
Скачать


 completions/iptables | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/completions/iptables b/completions/iptables
index ffb905b8..ad62737c 100644
--- a/completions/iptables
+++ b/completions/iptables
@@ -10,8 +10,12 @@ _iptables()
     [[ ${words[*]} =~ [[:space:]]-(t|-table=?)[[:space:]]*([^[:space:]]+) ]] &&
         table="-t ${BASH_REMATCH[2]}"
 
+    if [[ $COMP_LINE == *-E* ]]; then
+        rename=yes
+    fi
+
     case $prev in
-        -*[AIDRPFXLZ])
+        -*[AIDRPFXLZEN])
             COMPREPLY=($(compgen -W '`"$1" $table -nL 2>/dev/null | \
                 command sed -ne "s/^Chain \([^ ]\{1,\}\).*$/\1/p"`' -- "$cur"))
             ;;
@@ -37,7 +41,10 @@ _iptables()
             fi
             ;;
         *)
-            if [[ $cur == -* ]]; then
+            if [[ "$rename" -eq "yes" ]]; then
+                COMPREPLY=( $( compgen -W '`iptables $table -nL | \
+                sed -ne "s/^Chain \([^ ]\+\).*$/\1/p"`' -- $cur ) )
+            elif [[ "$cur" == -* ]]; then
                 COMPREPLY=($(compgen -W '$("$1" --help 2>&1 |
                 command sed -e "s/^\[\!\]//" | _parse_help -)' -- "$cur"))
                 [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin