[packages/mtr] - bash completion: IPv6 fix

adwol adwol at pld-linux.org
Sun Jun 24 01:34:03 CEST 2018


commit abf754ab94b5b5be7564a32ce1f39745b2aa6b9b
Author: Adam Osuchowski <adwol at pld-linux.org>
Date:   Sun Jun 24 01:33:29 2018 +0200

    - bash completion: IPv6 fix

 mtr-completion.patch | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/mtr-completion.patch b/mtr-completion.patch
index d83d2b8..8a13a7d 100644
--- a/mtr-completion.patch
+++ b/mtr-completion.patch
@@ -1,18 +1,27 @@
 diff -ruNp mtr-0.92.orig/bash-completion/mtr mtr-0.92/bash-completion/mtr
 --- mtr-0.92.orig/bash-completion/mtr	2017-06-02 10:54:58.000000000 +0200
-+++ mtr-0.92/bash-completion/mtr	2018-06-24 00:41:19.818077138 +0200
-@@ -1,4 +1,4 @@
++++ mtr-0.92/bash-completion/mtr	2018-06-24 01:31:20.748948291 +0200
+@@ -1,9 +1,8 @@
 -_mtr_module()
 +_mtr()
  {
-   local cur prev OPTS
-   COMPREPLY=()
-@@ -12,7 +12,7 @@ _mtr_module()
+-  local cur prev OPTS
+-  COMPREPLY=()
+-  cur="${COMP_WORDS[COMP_CWORD]}"
+-  prev="${COMP_WORDS[COMP_CWORD-1]}"
++  local cur prev words cword;
++  _init_completion -n : || return;
++
+   case $prev in
+     '-F'|'--filename')
+       local IFS=$'\n'
+@@ -12,7 +11,8 @@ _mtr_module()
        return 0
        ;;
      '-a'|'--address')
 -      COMPREPLY=( $(compgen -W "ADDRESS" -- $cur) )
 +      _ip_addresses
++      __ltrim_colon_completions "$cur"
        return 0
        ;;
      '-f'|'--first-ttl'|'-m'|'--max-ttl'|'-m'|'--max-unknown'|'-B'|'--bitpattern'|'-Q'|'--tos'|'-c'|'--report-cycles')
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mtr.git/commitdiff/abf754ab94b5b5be7564a32ce1f39745b2aa6b9b



More information about the pld-cvs-commit mailing list