fix fwupdmgr completion

- fix wrong _alternative usage
- fix `-v` definition
- fix exclusive option syntax
This commit is contained in:
Shohei YOSHIDA 2026-03-08 22:02:25 +09:00
parent 95b7c563b2
commit b835a4a76e
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 4 additions and 4 deletions

View File

@ -21,14 +21,14 @@ _fwupdmgr() {
_arguments -C \ _arguments -C \
'(- : *)'{-h,--help}'[display help information]' \ '(- : *)'{-h,--help}'[display help information]' \
'(- : *)'{-v,--version}'[display version information]' \ '(- : *)--version'[display version information]' \
{-v,--verbose}'[show extra debugging information]' \ '{-v,--verbose}'[show extra debugging information]' \
--offline'[schedule installation for next reboot when possible]' \ --offline'[schedule installation for next reboot when possible]' \
--allow-reinstall'[allow re-installing existing firmware versions]' \ --allow-reinstall'[allow re-installing existing firmware versions]' \
--allow-older'[allow downgrading firmware versions]' \ --allow-older'[allow downgrading firmware versions]' \
--allow-branch-switch'[allow switching firmware branch]' \ --allow-branch-switch'[allow switching firmware branch]' \
--force'[override warnings and force the action]' \ --force'[override warnings and force the action]' \
'(-y, --assume-yes)'{-y,--assume-yes}'[answer yes to all questions]' \ '(-y --assume-yes)'{-y,--assume-yes}'[answer yes to all questions]' \
--sign'[sign the uploaded data with the client certificate]' \ --sign'[sign the uploaded data with the client certificate]' \
--no-unreported-check'[do not check for unreported history]' \ --no-unreported-check'[do not check for unreported history]' \
--no-metadata-check'[do not check for old metadata]' \ --no-metadata-check'[do not check for old metadata]' \
@ -86,7 +86,7 @@ _fwupdmgr() {
;; ;;
(refresh) (refresh)
_arguments \ _arguments \
'1:file or remote ID:_alternative _files _fwupdmgr_remote_ids' \ '1:file or remote ID:_alternative "file\:file\:_files" "remotes\:remote ID\:_fwupdmgr_remote_ids"' \
&& ret=0 && ret=0
;; ;;
(switch-branch) (switch-branch)