mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00: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:
parent
6663c73eb0
commit
0eb3fd6b3f
1 changed files with 2 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue