- patches master
authorMarcin Krol <hawk@tld-linux.org>
Sun, 27 Feb 2022 00:28:30 +0000 (01:28 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Sun, 27 Feb 2022 00:28:30 +0000 (01:28 +0100)
bash-completion-ip_addresses.patch [new file with mode: 0644]
bash-completion-no_mtr.patch [new file with mode: 0644]

diff --git a/bash-completion-ip_addresses.patch b/bash-completion-ip_addresses.patch
new file mode 100644 (file)
index 0000000..720be3b
--- /dev/null
@@ -0,0 +1,18 @@
+--- bash-completion-2.11/bash_completion.orig  2021-03-06 22:21:09.007031994 +0100
++++ bash-completion-2.11/bash_completion       2021-03-06 22:24:28.382618551 +0100
+@@ -981,11 +981,10 @@ _ip_addresses()
+         *) n= ;;
+     esac
+     local PATH=$PATH:/sbin
+-    local addrs=$({
+-        LC_ALL=C ifconfig -a || ip addr show
+-    } 2>/dev/null |
+-        command sed -e 's/[[:space:]]addr:/ /' -ne \
+-            "s|.*inet${n}[[:space:]]\{1,\}\([^[:space:]/]*\).*|\1|p")
++    local addrs=$(
++        LC_ALL=C ip -o addr show \
++    2>/dev/null | \
++      command awk '{ gsub(/\/.*$/, "", $4); print $4 }' | sort)
+     COMPREPLY+=($(compgen -W "$addrs" -- "${cur-}"))
+ }
diff --git a/bash-completion-no_mtr.patch b/bash-completion-no_mtr.patch
new file mode 100644 (file)
index 0000000..174a16a
--- /dev/null
@@ -0,0 +1,11 @@
+--- bash-completion-2.11/bash_completion.orig  2021-03-06 22:24:43.862534689 +0100
++++ bash-completion-2.11/bash_completion       2021-03-07 06:44:50.513308049 +0100
+@@ -1801,7 +1801,7 @@ _known_hosts_real()
+ } # _known_hosts_real()
+ complete -F _known_hosts traceroute traceroute6 \
+-    fping fping6 telnet rsh rlogin ftp dig mtr ssh-installkeys showmount
++    fping fping6 telnet rsh rlogin ftp dig ssh-installkeys showmount
+ # This meta-cd function observes the CDPATH variable, so that cd additionally
+ # completes on directories under those specified in CDPATH.