summaryrefslogtreecommitdiff
path: root/etc/completions
diff options
context:
space:
mode:
Diffstat (limited to 'etc/completions')
-rw-r--r--etc/completions/_modprobe10
1 files changed, 9 insertions, 1 deletions
diff --git a/etc/completions/_modprobe b/etc/completions/_modprobe
index d55d739..629d1dd 100644
--- a/etc/completions/_modprobe
+++ b/etc/completions/_modprobe
@@ -53,7 +53,7 @@ arguments=(
'--force-vermagic[Ignore version magic when loading modules]'
'--force-modversion[Ignore CONFIG_MODVERSION when loading modules]'
'--show-depends[List dependencies of a module]'
- '*:module:_modprobe_all_modules'
+ '*:module:_modprobe_module'
)
for arg in ${(k)argument_pairs}; {
@@ -73,4 +73,12 @@ function _modprobe_loaded_modules {
compadd $(cut -d\ -f1 < /proc/modules)
}
+function _modprobe_module {
+ if [[ ${words[(I)-r]} == 0 ]] {
+ _modprobe_all_modules
+ } else {
+ _modprobe_loaded_modules
+ }
+}
+
_arguments -s ${arguments}