mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 15:01:16 -03:00
Make modprobe completion more precise
Only match loaded modules when -r is specified. Also adds /lib/modules/(uname -r)/misc to the search path. This directory is used by Gentoo for package-provided modules (such as the app-emulation/virtualbox-modules)
This commit is contained in:
committed by
Fabian Homborg
parent
6663c73eb0
commit
0eb3fd6b3f
@@ -2,7 +2,8 @@
|
||||
# Completions for the modprobe command
|
||||
#
|
||||
|
||||
complete -c modprobe --no-files -d Module -a "(find /lib/modules/(uname -r)/kernel -type f | sed -e 's/\/.*\/\([^\/.]*\).*/\1/')"
|
||||
complete -c modprobe -n "__fish_contains_opt -s r remove" --no-files -d Module -a "(lsmod | cut -d' ' -f1)"
|
||||
complete -c modprobe -n "not __fish_contains_opt -s r remove" --no-files -d Module -a "(find /lib/modules/(uname -r)/{kernel,misc} -type f 2>/dev/null | sed -e 's/\/.*\/\([^\/.]*\).*/\1/')"
|
||||
complete -c modprobe -s v -l verbose --description "Print messages about what the program is doing"
|
||||
complete -c modprobe -s C -l config --description "Configuration file" -r
|
||||
complete -c modprobe -s c -l showconfig --description "Dump configuration file"
|
||||
|
||||
Reference in New Issue
Block a user