commit 3f34a9653eadf864955aa0799336e8ff5d324f5d Author: Adam Osuchowski <ad...@pld-linux.org> Date: Sun Jun 24 00:14:28 2018 +0200
- fixed IP adresses completion (always use ip tool instead of ifconfig; support for IPv6; support for multiple addresses per interface) bash-completion-ip_addresses.patch | 14 ++++++++++++++ bash-completion.spec | 2 ++ 2 files changed, 16 insertions(+) --- diff --git a/bash-completion.spec b/bash-completion.spec index 62a10b2..eac00a5 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -20,6 +20,7 @@ Source4: http://svn.php.net/viewvc/pear2/sandbox/PEAR_BashCompletion/trunk/pear? # Source4-md5: 8ce77e4459e2c45e2096da8d03c8f43d Patch0: %{name}-rpm-cache.patch Patch1: pear.patch +Patch2: %{name}-ip_addresses.patch URL: https://github.com/scop/bash-completion BuildRequires: sed >= 4.0 Requires(triggerpostun): sed >= 4.0 @@ -44,6 +45,7 @@ dopełnianie parametrów linii poleceń. cp -p '%{SOURCE4}' completions/pear %patch0 -p1 %patch1 -p1 +%patch2 -p1 # cleanup backups after patching find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f diff --git a/bash-completion-ip_addresses.patch b/bash-completion-ip_addresses.patch new file mode 100644 index 0000000..3347100 --- /dev/null +++ b/bash-completion-ip_addresses.patch @@ -0,0 +1,14 @@ +diff -ruNp bash-completion-2.8.orig/bash_completion bash-completion-2.8/bash_completion +--- bash-completion-2.8.orig/bash_completion 2018-03-17 09:25:59.000000000 +0100 ++++ bash-completion-2.8/bash_completion 2018-06-24 00:00:18.077840392 +0200 +@@ -919,9 +919,7 @@ _ip_addresses() + { + local PATH=$PATH:/sbin + COMPREPLY+=( $( compgen -W \ +- "$( { LC_ALL=C ifconfig -a || ip addr show; } 2>/dev/null | command sed -ne \ +- 's/.*addr:\([^[:space:]]*\).*/\1/p' -ne \ +- 's|.*inet[[:space:]]\{1,\}\([^[:space:]/]*\).*|\1|p' )" \ ++ "$( ip -o addr show 2>/dev/null | command awk '{ gsub(/\/.*$/, "", $4); print $4 }' | sort )" \ + -- "$cur" ) ) + } + ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/bash-completion.git/commitdiff/3f34a9653eadf864955aa0799336e8ff5d324f5d _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit