mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-20 02:11:16 -03:00
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
6 lines
244 B
Fish
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
|