Files
fish-shell/share/functions/__fish_print_modules.fish
Jaakko Koivisto 7b98a275fe Added 'updates' -directory to the kernel module locations.
Linux kernel modules installed by target 'modules_install' are installed
to '/usr/lib/<kernel>/updates'. This applies to both out-of-tree kernel
modules, or when building in-tree modules individually.

Module tools like 'modprobe' and 'modinfo' search the
'updates'-directory automatically, so it should be expected that fish
autocomplete to provide these modules as well.

Closes #12682
2026-04-28 13:51:24 +08:00

6 lines
244 B
Fish

# localization: skip(private)
# Helper function for completions that need to enumerate Linux modules
function __fish_print_modules
find /lib/modules/(uname -r)/{kernel,misc,updates} -type f 2>/dev/null | sed -e 's$/.*/\([^/.]*\).*$\1$'
end