]> git.pld-linux.org Git - packages/bash-completion.git/blob - bash-completion-ip_addresses.patch
- better support for rpm package completion
[packages/bash-completion.git] / bash-completion-ip_addresses.patch
1 diff -ruNp bash-completion-2.8.orig/bash_completion bash-completion-2.8/bash_completion
2 --- bash-completion-2.8.orig/bash_completion    2018-03-17 09:25:59.000000000 +0100
3 +++ bash-completion-2.8/bash_completion 2018-06-24 00:00:18.077840392 +0200
4 @@ -919,9 +919,7 @@ _ip_addresses()
5  {
6      local PATH=$PATH:/sbin
7      COMPREPLY+=( $( compgen -W \
8 -        "$( { LC_ALL=C ifconfig -a || ip addr show; } 2>/dev/null | command sed -ne \
9 -            's/.*addr:\([^[:space:]]*\).*/\1/p' -ne \
10 -            's|.*inet[[:space:]]\{1,\}\([^[:space:]/]*\).*|\1|p' )" \
11 +        "$( ip -o addr show 2>/dev/null | command awk '{ gsub(/\/.*$/, "", $4); print $4 }' | sort )" \
12          -- "$cur" ) )
13  }
14  
This page took 0.060445 seconds and 3 git commands to generate.