aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_print_modules.fish
diff options
context:
space:
mode:
Diffstat (limited to 'share/functions/__fish_print_modules.fish')
-rw-r--r--share/functions/__fish_print_modules.fish4
1 files changed, 4 insertions, 0 deletions
diff --git a/share/functions/__fish_print_modules.fish b/share/functions/__fish_print_modules.fish
new file mode 100644
index 00000000..e237e7a1
--- /dev/null
+++ b/share/functions/__fish_print_modules.fish
@@ -0,0 +1,4 @@
+# Helper function for completions that need to enumerate Linux modules
+function __fish_print_modules
+ find /lib/modules/(uname -r)/{kernel,misc} -type f ^ /dev/null | sed -e 's$/.*/\([^/.]*\).*$\1$'
+end