gentoo-ebuilds/app-shells/bash-completion/files/bash-completion-2.14.0-optimize-kernel-modules.patch
Arthur Zamarin fc6a4f1238
app-shells/bash-completion: add 2.14.0
- Also apply fix to optimize kernel modules search completion

Closes: https://bugs.gentoo.org/669128
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2024-05-10 12:04:19 +03:00

13 lines
493 B
Diff

https://bugs.gentoo.org/669128#c3
--- a/bash_completion
+++ b/bash_completion
@@ -2037,7 +2037,7 @@ _comp__init_set_up_service_completions
_comp_compgen_kernel_modules()
{
local _modpath=/lib/modules/$1
- _comp_compgen_split -- "$(command ls -RL "$_modpath" 2>/dev/null |
+ _comp_compgen_split -- "$(command ls -RL "$_modpath"/!(source|build) 2>/dev/null |
command sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p' \
-e 's/^\(.*\)\.ko\.zst$/\1/p')"
}