]> git.pld-linux.org Git - packages/bash-completion.git/commitdiff
- fixed IP adresses completion (always use ip tool instead of ifconfig; support for...
authorAdam Osuchowski <adwol@pld-linux.org>
Sat, 23 Jun 2018 22:14:28 +0000 (00:14 +0200)
committerAdam Osuchowski <adwol@pld-linux.org>
Sat, 23 Jun 2018 22:14:28 +0000 (00:14 +0200)
bash-completion-ip_addresses.patch [new file with mode: 0644]
bash-completion.spec

diff --git a/bash-completion-ip_addresses.patch b/bash-completion-ip_addresses.patch
new file mode 100644 (file)
index 0000000..3347100
--- /dev/null
@@ -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" ) )
+ }
index 62a10b2c0120d67fab83f97fb4710057b4d5b516..eac00a5f9d13d2fccfa57c94dec7e7b33ef1e9a2 100644 (file)
@@ -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
This page took 0.075181 seconds and 4 git commands to generate.