diff options
| author | Oliver Kiddle <opk@zsh.org> | 2026-06-19 01:37:33 +0200 |
|---|---|---|
| committer | Oliver Kiddle <opk@zsh.org> | 2026-06-19 01:37:33 +0200 |
| commit | a4e9eb4117613307405a71678af24e044c265189 (patch) | |
| tree | ca1d71317d3319b8753831df61c1941aecd2040a /Completion/Linux/Command/_modutils | |
| parent | 54801: fix two more warnings from 54710 (diff) | |
| download | zsh-a4e9eb4117613307405a71678af24e044c265189.tar zsh-a4e9eb4117613307405a71678af24e044c265189.tar.gz zsh-a4e9eb4117613307405a71678af24e044c265189.tar.bz2 zsh-a4e9eb4117613307405a71678af24e044c265189.tar.lz zsh-a4e9eb4117613307405a71678af24e044c265189.tar.xz zsh-a4e9eb4117613307405a71678af24e044c265189.tar.zst zsh-a4e9eb4117613307405a71678af24e044c265189.zip | |
54800, 54807: completion options update
Diffstat (limited to 'Completion/Linux/Command/_modutils')
| -rw-r--r-- | Completion/Linux/Command/_modutils | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/Completion/Linux/Command/_modutils b/Completion/Linux/Command/_modutils index f19784dff..4e87c4767 100644 --- a/Completion/Linux/Command/_modutils +++ b/Completion/Linux/Command/_modutils @@ -38,11 +38,15 @@ _modutils() { ) case "$service" in - lsmod) _arguments -s "$args[@]" && return ;; + lsmod) + _arguments -s "$args[@]" \ + '(-s --syslog)'{-s,--syslog}'[report via syslog instead of stderr]' \ + '(-v --verbose)'{-v,--verbose}'[enable more messages]' && return + ;; modinfo) _arguments -s -C "$args[@]" \ - '(-)'{-k+,--set-version=}'[use modules from a different kernel version]:kernel_version:($(echo $modules_dir/*(/\:t)))' \ + '(-)'{-k+,--set-version=}'[use modules from a different kernel version]:kernel_version:compadd $modules_dir/*(/\:t)' \ {-b+,--basedir=}'[use specified directory as filesystem root]:path:_directories' \ '1:module file:->all-modules' \ + '(field)' \ @@ -59,13 +63,14 @@ _modutils() { ign='-h --help -V --version -c --showconfig --show-config' _arguments -s -C "$args[@]" \ "(-a --all $ign)"{-a,--all}'[load all matching modules]' \ - "(-n --show $ign)"{-n,--show}"[don't actually perform action]" \ "(-q --quiet $ign)"{-q,--quiet}"[don't complain about insmod failures]" \ "(-s --syslog $ign)"{-s,--syslog}'[report via syslog instead of stderr]' \ "(-v --verbose $ign)"{-v,--verbose}'[print all commands as executed]' \ '(-C --config)'{-C+,--config=}'[specify config file]:config file:_files' \ "(-r --remove -a --all $ign)"{-r,--remove}'[remove module (stacks)]' \ - '--remove-dependencies[also remove modules depending on it]' \ + '!--remove-dependencies' \ + '--remove-holders[also remove module holders]' \ + '(-w --wait)'{-w+,--wait=}"[wait for module's refcount to become 0 so it can be removed (with -r)]:delay (msecs)" \ '(* -R --resolve-alias)'{-R,--resolve-alias}'[only lookup and print alias and exit]' \ '--first-time[fail if module already inserted or removed]' \ "(-a --all $ign)"{'-i[ignore install/remove commands in config file]','--ignore-install[ignore install commands in config file]','--ignore-remove[ignore remove commands in config file]'} \ @@ -76,8 +81,8 @@ _modutils() { '(-D --show-depends)'{-D,--show-depends}'[only print module dependencies and exit]' \ '(-)'{-c,--showconfig,--show-config}'[show current configuration]' \ --{show,dump}'-modversions[dump module symbol version and exit]' \ - {-d+,--dirname=}'[use specified directory as filesystem root]:path:_directories' \ - {-S+,--set-version=}'[use modules from a different kernel version]:kernel_version:($(echo $modules_dir/*(/\:t)))' \ + '(-d --dirname)'{-d+,--dirname=}'[use specified directory as filesystem root]:path:_directories' \ + '(-S --set-version)'{-S+,--set-version=}'[use modules from a different kernel version]:kernel_version:($(echo $modules_dir/*(/\:t)))' \ '--show-exports[only print module exported symbol versions and exit]' \ '(-n --dry-run --show)'{-n,--dry-run,--show}"[don't execute operations, just print]" \ "(-c $ign)1:modules:->loadable-modules" \ @@ -87,17 +92,20 @@ _modutils() { ;; rmmod) - _arguments -s -C "$args[@]" \ + _arguments -s "$args[@]" \ '(-f --force)'{-f,--force}'[allow modules that are in use to be removed]' \ '(-s --syslog)'{-s,--syslog}'[send errors to syslog]' \ '(-v --verbose)'{-v,--verbose}'[be verbose]' \ - '*:loaded module:->loaded-modules' && ret=0 + '*:loaded module:->loaded-modules' && return ;; insmod) - _arguments "$args[@]" \ - '1:module file:_files' \ - '*:module parameters' && ret=0 + _arguments -s "$args[@]" \ + '(-f --force)'{-f,--force}'[forces a module load (dangerous)]' \ + '(-s --syslog)'{-s,--syslog}'[report via syslog instead of stderr]' \ + '(-v --verbose)'{-v,--verbose}'[enable more messages]' \ + '1:module file:_files -g "*.ko(|.gz|.xz|.zst)(-.)"' \ + '*:module option' && return ;; esac |
