_dnf5 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. #compdef dnf5
  2. # based on dnf-5.2.6.2
  3. # utility functions
  4. _dnf5_helper() {
  5. _call_program specs $service "${(q-)@}" "${(q-)PREFIX}\*" \
  6. -qC --assumeno --nogpgcheck 2>/dev/null </dev/null
  7. }
  8. _dnf5_repositories() {
  9. # required option: -T (all|disabled|enabled)
  10. local selected expl
  11. zparseopts -D -E - T:=selected
  12. selected=$selected[2]
  13. _wanted $selected-repositories expl "$selected repository" \
  14. compadd "$@" - "${(@)${(f)$(_dnf5_helper repo list --$selected)}[2,-1]%% *}"
  15. }
  16. _dnf5_packages() {
  17. # required option: -T (all|available|installed|upgradable)
  18. local selected opt expl
  19. zparseopts -D -E - T:=selected
  20. selected=$selected[2]
  21. case $selected in
  22. all) opt='' ;; # option --all does not exist
  23. upgradable) opt='--upgrades' ;;
  24. *) opt="--$selected" ;;
  25. esac
  26. _wanted $selected-packages expl "$selected package" \
  27. compadd "$@" - $(_dnf5_helper repoquery $opt --qf='%{name} ')
  28. }
  29. _dnf5_rpm_files() {
  30. local expl
  31. _wanted rpm-files expl 'rpm file' _files -g '(#i)*.rpm(-.)'
  32. }
  33. _dnf5_packages_or_rpms() {
  34. if [[ "$words[CURRENT]" = (*/*|\~*) ]]; then # if looks like a path name
  35. _dnf5_rpm_files
  36. else
  37. _dnf5_packages "$@"
  38. fi
  39. }
  40. _dnf5_groups() {
  41. # optional option: -T (available|installed)
  42. local update_policy selected line pat groups
  43. zparseopts -D -E - T:=selected
  44. selected=$selected[2]
  45. if [[ -z $selected ]]; then
  46. selected=all
  47. opt= # option --all does not exist
  48. else
  49. opt=--$selected
  50. fi
  51. # XXX hidden groups are not included
  52. for line in ${${(f)"$(_dnf5_helper group list $opt)"}[2,-1]}; do
  53. line=( ${(z)line} )
  54. groups+=( "$line[1]:$line[2,-2]" )
  55. done
  56. _describe -t $selected-groups "$selected group" groups
  57. }
  58. _dnf5_environments() {
  59. local line envs
  60. for line in ${${(f)"$(_dnf5_helper environment list)"}[2,-1]}; do
  61. line=( ${(z)line} )
  62. envs+=( "$line[1]:$line[2,-2]" )
  63. done
  64. _describe -t environments 'environment' envs
  65. }
  66. # completers for (several) dnf commands
  67. _dnf5-advisory () {
  68. _arguments : \
  69. $advisory_opts \
  70. '--contains-pkgs=[only show advisories containing specified packages]: : _sequence _dnf5_packages -T installed' \
  71. + '(with)' \
  72. '--with-cve[show only advisories referencing CVE ticket]' \
  73. '--with-bz[show only advisories referencing Bugzilla ticket]' \
  74. + '(type)' \
  75. '--all[show all advisories]' \
  76. '--available[show advisories containing newer versions of installed packages (default)]' \
  77. '--installed[show advisories containing equal and older version of installed packages]' \
  78. '--updates[show advisories containing upgradable packages]' \
  79. + args \
  80. ':subcommand:(list info summary)' '*:advisory spec:'
  81. }
  82. _dnf5-group() {
  83. local -a tmp
  84. if (( CURRENT == 2 )); then
  85. tmp=(
  86. 'list:list all matching groups'
  87. 'info:print detailed information about groups'
  88. 'install:install packages from specified groups'
  89. 'remove:remove removable packages in specified groups'
  90. 'upgrade:upgrade specified groups and packages in them'
  91. )
  92. _describe -t subcommands 'subcommand' tmp
  93. else
  94. case $words[2] in
  95. list|info)
  96. tmp=(
  97. '(--installed)--available[show only available groups]'
  98. '(--available)--installed[show only installed groups]'
  99. '--hidden[show also hidden groups]'
  100. '--contains-pkgs=[show only groups containing specified packages]: : _sequence _dnf5_packages -T all'
  101. '*: : _dnf5_groups'
  102. )
  103. ;;
  104. install)
  105. tmp=( $common_opts
  106. '--with-optional[include optional packages from the groups]'
  107. '*: : _dnf5_groups -T available' )
  108. ;|
  109. upgrade)
  110. tmp=( ${common_opts:#--skip-broken*}
  111. '*: : _dnf5_groups -T installed' )
  112. ;|
  113. remove)
  114. tmp=( $offline_opts
  115. '*: : _dnf5_groups -T installed' )
  116. ;|
  117. install|remove)
  118. tmp+=( '--no-packages[operate on groups only, not manipulate any packages]' )
  119. ;|
  120. install|upgrade)
  121. tmp+=( $downgrade_opts )
  122. ;;
  123. esac
  124. _arguments : $tmp
  125. fi
  126. }
  127. _dnf5-history() {
  128. local -a tmp
  129. if (( CURRENT == 2 )); then
  130. tmp=(
  131. 'list:list info about recorded transactions'
  132. 'info:print detailed about specific transactions'
  133. 'undo:revert all actions from the specified transaction'
  134. 'redo:repeat the specified transaction'
  135. 'rollback:undo all transactions performed after the specified transaction'
  136. 'store:store the transaction into a directory'
  137. )
  138. _describe -t subcommands 'subcommand' tmp
  139. else
  140. case $words[2] in
  141. list|info)
  142. tmp=( '--reverse[reverse the order of transactions in output]' )
  143. ;;
  144. undo|rollback|redo)
  145. tmp=( '--skip-unavailable[allow skipping impossible actions]' )
  146. ;|
  147. undo|rollback)
  148. tmp+=( $replay_opts )
  149. ;;
  150. store)
  151. tmp=( {-o,--output=}'[directory for storing the transaction (default ./transaction)]: : _directories')
  152. esac
  153. _arguments : $tmp '2:transaction:( )'
  154. fi
  155. }
  156. _dnf5-mark() {
  157. local -a tmp
  158. if (( CURRENT == 2 )); then
  159. tmp=(
  160. 'user:mark the package as user-installed'
  161. 'dependency:mark the package as a dependency'
  162. 'weak:mark the package as a weak dependency'
  163. 'group:mark the package as installed by the specified group'
  164. )
  165. _describe -t subcommands 'subcommand' tmp
  166. else
  167. tmp=(
  168. '--skip-unavailable[skip packages not installed on the system]'
  169. '--store=[store the transaction in specified directory]: : _directories'
  170. )
  171. if [[ $words[2] = group ]]; then
  172. tmp+=( '2:group-id: _dnf5_groups -T installed' )
  173. fi
  174. _arguments : $tmp '*: : _dnf5_packages -T installed'
  175. fi
  176. }
  177. _dnf5-module() {
  178. local -a tmp
  179. if (( CURRENT == 2 )); then
  180. tmp=(
  181. 'list:list module streams'
  182. 'info:print details about module streams'
  183. 'enable:enable module streams'
  184. 'disable:disable modules including all their streams'
  185. "reset:reset module state so it's no longer enabled or disabled"
  186. )
  187. _describe -t subcommands 'subcommand' tmp
  188. elif (( CURRENT == 3 )) && [[ $cur = -* ]]; then
  189. case $words[2] in
  190. list|info) tmp=( --enabled --disabled ) ;;
  191. enable) tmp=( --skip-broken --skip-unavailable ) ;;
  192. *) tmp=( --skip-unavailable ) ;;
  193. esac
  194. _wanted options expl 'option' compadd -a tmp
  195. else
  196. _message 'module spec'
  197. fi
  198. }
  199. _dnf5-offline() { # also used by the 'system-upgrade' command
  200. local -a tmp
  201. if (( CURRENT == 2 )); then
  202. tmp=(
  203. 'clean:remove any stored offline transactions and cached packages'
  204. 'log:list boots during which offline transaction was attempted'
  205. 'reboot:prepare the system for offline transaction and reboot'
  206. )
  207. if [[ $cmd = offline ]]; then
  208. tmp+=( 'status:show status of the current offline transaction' )
  209. else
  210. tmp+=( 'download:download all packages needed for upgrade' )
  211. fi
  212. _describe -t subcommands 'subcommand' tmp && ret=0
  213. else
  214. case $words[2] in
  215. download)
  216. _arguments : \
  217. '--releasever=[the version to upgrade to]:version number:' \
  218. '--no-downgrade:do not install packages older than currently installed' '*: :' && ret=0
  219. ;;
  220. log)
  221. _arguments : \
  222. '--number=[show log of transaction specified by number]:transaction number:' '*: :' && ret=0
  223. ;;
  224. reboot)
  225. _wanted options expl 'option' compadd -- --poweroff && ret=0
  226. ;;
  227. esac
  228. fi
  229. }
  230. _dnf5-repoquery() {
  231. local v
  232. local -a opts=(
  233. $advisory_opts
  234. '--arch=[limit results to specified architectures]:list of archs: '
  235. '--available[limit results to available packages]'
  236. '--disable-modular-filtering[include packages of inactive module streams]'
  237. '--duplicates[limit to installed duplicate packages]'
  238. '--exactdeps[limit to packages that require capability specified by ==what{requires,depends}]'
  239. '--extras[limit to installed packages that are not present in any available repository]'
  240. '--file=[limit results to packages which own specified file]:list of files: _sequence _files'
  241. '--installed[query installed packages]'
  242. '--installonly[limit to installed installonly packages]'
  243. '--latest-limit=[limit to latest packages of specified number]:number:'
  244. '--leaves[limit to groups of installed packages not required by other installed packages]'
  245. '--providers-of=[select packages that provide specified attribute]:attribute:(conflicts depends enhances obsoletes provides recommends requires requires_pre suggests supplement)'
  246. '--recent[limit to only recently changed packages]'
  247. '--recursive[make --whatrequires/--providers-of work recursively]'
  248. '--security[limit to packages in security advisories]'
  249. '--srpm[use the corresponding source RPM]'
  250. '--unneeded[limit to unneeded installed packages]'
  251. '--upgrades[limit to available packages that provide upgrade for installed packages]'
  252. '--userinstalled[limit to packages that are not installed as dependencies]'
  253. '--whatdepends=[limit to packages that require, enhance, recommend, suggest of supplement specified capability]:list of capability:'
  254. '--whatconflicts=[limit to packages that conflicts with specified capabilities]:list of capability: '
  255. )
  256. for v in enhance obsolete provide recommend require suggest supplement; do
  257. opts+=( "--what${v}s=[limit to packages that $v specified capabilities]:list of capability: ")
  258. done
  259. # mutually exclusive formating options
  260. opts+=(
  261. + '(format)'
  262. '--conflicts[display capabilities that the package conflicts with]'
  263. '--depends[display capabilities that the package depends on, enables, recommends, suggests or supplements]'
  264. '--files[show files in the package]'
  265. '--requires-pre[display capabilities required to run pre/post scripts of the package]'
  266. '--sourcerpm[display source RPM of the package]'
  267. '--location[display location of the package]'
  268. '--info[show detailed information about the package]'
  269. '--changelogs[print the package changelogs]'
  270. '(- *)--querytags[list tags recognized by --queryformat]'
  271. '--queryformat=[specify output format]:format:'
  272. )
  273. for v in enhance obsolete provide recommend require suggest supplement; do
  274. opts+=( "--${v}s[display capabilities ${v}ed by the package]" )
  275. done
  276. _arguments : '*: : _dnf5_packages -T all' $opts
  277. }
  278. # dnf commands
  279. _dnf5_commands() {
  280. local -a dnf_cmds=(
  281. 'advisory:manage advisories'
  282. 'autoremove:remove unneeded packages'
  283. 'check:check for problems in package database'
  284. 'check-upgrade:check for available package upgrades'
  285. 'clean:remove or invalidate cached data'
  286. 'distro-sync:up/downgrade installed packages to the latest available'
  287. 'downgrade:downgrade packages'
  288. 'download:download packages'
  289. 'environment:manage comps environments'
  290. 'group:manage comps groups'
  291. 'history:manage transaction history'
  292. 'info:provide detailed information about packages'
  293. 'install:install packages'
  294. 'leaves:list groups of leaf packages'
  295. 'list:list installed or available packages'
  296. 'makecache:generate the metadata cache'
  297. 'mark:change the reason of an installed package'
  298. 'module:manage modules'
  299. 'offline:manage offline transactions'
  300. 'provides:find what package provides the given value'
  301. 'reinstall:reinstall packages'
  302. 'remove:remove packages'
  303. 'replay:replay stored transactions'
  304. 'repo:manage repositories'
  305. 'repoquery:search for packages in repositories'
  306. 'search:search for packages using keywords'
  307. 'swap:remove software and install another in the single transaction'
  308. 'system-upgrade:upgrade the system to a new major release'
  309. 'upgrade:upgrade packages'
  310. 'versionlock:protect packages from updates to newer versions'
  311. )
  312. _describe -t dnf-commands 'dnf command' dnf_cmds
  313. }
  314. # subcommands and options
  315. _dnf5_subcmds_opts() {
  316. local cur=$words[CURRENT] cmd=$words[1] expl ret=1
  317. local -a tmp
  318. # common options
  319. local -a offline_opts=(
  320. '(--store)--offline[store the transaction to be performed offline]'
  321. '(--offline)--store=[store the transaction in specified directory]: : _directories'
  322. )
  323. local -a common_opts=(
  324. $offline_opts
  325. '--allowerasing[allow erasing of installed packages]'
  326. '--skip-broken[resolve dependency problems by skipping problematic packages]'
  327. "--skip-unavailable[skip packages that can't be synchronized]"
  328. '--downloadonly[download packages without executing transaction]'
  329. )
  330. local -a advisory_opts=(
  331. '--advisories=[consider only specified advisories]:list of advisories:'
  332. '--advisory-severities=[limit to advisories with specified severity]:severity:_sequence compadd - critical important moderate low none'
  333. '--bzs=[limit to advisories that fix specified Bugzilla ID]:list of Bugzilla ID:'
  334. '--cves=[limit to advisories that fix specified CVE ID]:list of CVD ID]:'
  335. '--security[limit to security advisories]'
  336. '--bugfix[limit to bugfix advisories]'
  337. '--enhancement[limit to enhancement advisories]'
  338. '--newpackage[limit to newpackage advisories]'
  339. )
  340. local -a downgrade_opts=(
  341. '(--no-allow-downgrade)--allow-downgrade[enable downgrade of dependencies]'
  342. '(--allow-downgrade)--no-allow-downgrade[disable downgrade of dependencies]'
  343. )
  344. local -a replay_opts=(
  345. '--ignore-extras[not consider extra packages]'
  346. '--ignore-installed[mismatches between installed and stored transaction are not errors]'
  347. )
  348. # Deal with some aliases (not comprehensive)
  349. case $cmd in
  350. check-updgrade) cmd=check-update;;
  351. dg) cmd=downgrade;;
  352. dsync) cmd=distro-sync;;
  353. grp) cmd=group;;
  354. if) cmd=info;;
  355. in) cmd=install;;
  356. ls) cmd=list;;
  357. mc) cmd=makecache;;
  358. rei) cmd=reinstall;;
  359. rm) cmd=remove ;;
  360. rq) cmd=repoquery;;
  361. se) cmd=search;;
  362. update|up) cmd=upgrade;;
  363. esac
  364. local curcontext="${curcontext%:*:*}:dnf-${cmd}:"
  365. case $cmd in
  366. advisory|group|history|mark|module|offline|repoquery)
  367. _dnf5-$cmd && ret=0
  368. ;;
  369. system-upgrade)
  370. _dnf5-offline && ret=0
  371. ;;
  372. autoremove)
  373. _arguments : $offline_opts && ret=0
  374. ;;
  375. check)
  376. _arguments : \
  377. '--dependencies[show missing dependencies and conflicts]' \
  378. '--duplicates[show duplicated packages]' \
  379. '--obsoleted[show obsoleted packages]' && ret=0
  380. ;;
  381. check-upgrade)
  382. _arguments : \
  383. $advisory_opts \
  384. '--changelogs[print package changelogs]' \
  385. '--minimal[reports the lowest versions of packages that fix advisories]' \
  386. '*: : _dnf5_packages -T installed' && ret=0
  387. ;;
  388. clean)
  389. tmp=(
  390. 'dbcache:remove cache files generated from the repository metadata'
  391. 'expire-cache:mark the repository metadata expired'
  392. 'metadata:remove the repository metadata'
  393. 'packages:remove any cached packages'
  394. 'all:clean all'
  395. )
  396. _describe -t cache-types 'cache type' tmp && ret=0
  397. ;;
  398. distro-sync)
  399. _arguments : $common_opts '*: : _dnf5_packages -T installed' && ret=0
  400. ;;
  401. downgrade)
  402. _arguments : \
  403. $common_opts $downgrade_opts \
  404. '*: : _dnf5_packages -T installed' && ret=0
  405. ;;
  406. download)
  407. _arguments : \
  408. '--arch=[limit to packages of specified architecture]:list of architectures:' \
  409. '--resolve[resolve and download needed dependencies]' \
  410. '--alldeps[with --resolve, also download already installed dependencies]' \
  411. '--destdir=[download to the specified directory]: : _directories' \
  412. '--srpm[download the source rpm]' \
  413. '--url[print the list of URLs where the rpms can be downloaded]' \
  414. '*--urlprotocol=[with --url, limit to specified protocols]:protocol:_sequence compadd - http https ftp file' \
  415. '*: : _dnf5_packages -T all' && ret=0
  416. ;;
  417. environment)
  418. _arguments : \
  419. '--available[show only available environments]' \
  420. '--installed[show only installed environments]' \
  421. ':subcommand:(list info)' \
  422. '*: : _dnf5_environments' && ret=0
  423. ;;
  424. info|list)
  425. _arguments : \
  426. '--showduplicates[show all versions of the packages]' \
  427. '*: : _dnf5_packages -T all' \
  428. + '(type)' \
  429. '--installed[list only installed packages]:*: : _dnf5_packages -T installed' \
  430. '--available[list only available packages]:*: : _dnf5_packages -T available' \
  431. '--extras[list only extras]' \
  432. '--obsoletes[list only installed but obsoleted packages]:*: : _dnf5_packages -T installed' \
  433. '--recent[list only recently added packages]' \
  434. '--upgrades[list only available upgrades of installed packages]:*: : _dnf5_packages -T upgradable' \
  435. '--autoremove[list only packages that will be autoremoved]:*: : _dnf5_packages -T installed' &&ret=0
  436. ;;
  437. install)
  438. _arguments : \
  439. $common_opts $downgrade_opts $advisory_opts \
  440. '*: : _dnf5_packages_or_rpms -T available' && ret=0
  441. ;;
  442. leaves|makecache)
  443. # nothing to complete
  444. ;;
  445. provides)
  446. _files && ret=0
  447. ;;
  448. reinstall)
  449. _arguments : \
  450. $common_opts $downgrade_opts \
  451. '*: : _dnf5_packages_or_rpms -T installed' && ret=0
  452. ;;
  453. remove)
  454. _arguments : \
  455. $offline_opts \
  456. '--no-autoremove[not remove dependencies that are no longer used]' \
  457. '*: : _dnf5_packages -T installed' && ret=0
  458. ;;
  459. replay)
  460. _arguments : \
  461. $replay_opts \
  462. ':transaction path:_directories' && ret=0
  463. ;;
  464. repo)
  465. _arguments : \
  466. '--all[show info about all repositories]' \
  467. '--enabled[show info only about enabled repositories]' \
  468. '--disabled[show info only about disabled repositories]' \
  469. ':subcommand:(list info)' && ret=0
  470. ;;
  471. search)
  472. _arguments : \
  473. '--all[search patterns also inside description and URL fields]' \
  474. '--showduplicates[show all versions of packages, not only the latest ones]' \
  475. '*:search pattern:' && ret=0
  476. ;;
  477. swap)
  478. _arguments : \
  479. $offline_opts \
  480. '--allowerasing[allow erasing of installed packages]' \
  481. ': : _dnf5_packages -T installed' \
  482. ': : _dnf5_packages -T available' && ret=0
  483. ;;
  484. upgrade)
  485. _arguments : \
  486. ${common_opts:#--skip-broken*} $downgrade_opts $advisory_opts \
  487. '--minimal[upgrade only to the lowest available versions that fix advisories]' \
  488. '--destdir=[specify directory into which downloading packages]: : _directories' \
  489. '*: : _dnf5_packages_or_rpms -T upgradable' && ret=0
  490. ;;
  491. versionlock)
  492. _arguments : \
  493. ':subcommand:(add exclude clear delete list)' \
  494. '*: : _dnf5_packages -T all' && ret=0
  495. ;;
  496. esac
  497. return ret
  498. }
  499. # main completer
  500. _dnf5() {
  501. local curcontext="$curcontext" state state_descr line ret=1
  502. typeset -A opt_args
  503. local -a opts=(
  504. '(-y --assumeyes)--assumeno[answer no for all questions]'
  505. '--best[try the best available package version]'
  506. '(-C --cacheonly)'{-C,--cacheonly}"[run entirely from system cache, don't update cache]"
  507. '--comment=[add comment to transaction history]:comment:'
  508. '(-c --config)'{-c+,--config=}'[specify configuration file]:config file:_files'
  509. '--debugsolver[dump detailed solving results in file ./debugdata]'
  510. '*--disable-plugin=[disable specified plugins]:list of plugin names:'
  511. '(--repo)*--disable-repo=[disable specified repos]: : _sequence _dnf5_repositories -T enabled'
  512. '--dump-main-config[print main configuration values to stdout]'
  513. '*--dump-repo-config=[print repository configuration values to stdout]:repi id'
  514. '--dump-variables[print variable values to stdout]'
  515. '*--enable-plugin=[enable specified plugins]:list of plugin names:'
  516. '*--enable-repo=[enable additional repos]: : _sequence _dnf5_repositories -T disabled'
  517. '--forcearch=[force the use of the specified arch]:arch:'
  518. '(-)'{-h,--help}'[show the help message]'
  519. '--installroot=[set install root]: : _directories'
  520. '--no-best[do not limit transactions to best candidates]'
  521. '--no-docs[do not install documentation]'
  522. '--no-gpgcheck[skip checking GPG signatures on packages]'
  523. '--no-plugins[disable all plugins]'
  524. '(-q --quiet)'{-q,--quiet}'[show just the relevant content]'
  525. '--refresh[force refreshing metadata before running the command]'
  526. '--releasever=[override distribution release in config files]:release ver:'
  527. '(--disablerepo)*--repo=[enable just the specified repo]: : _sequence _dnf5_repositories -T all'
  528. '*--repofrompath=[specify additional repos]:repository_label,path_or_url: '
  529. '*--setopt=[override option in config file]:repoid.option=value:'
  530. '*--setvar=[override DNF5 variable value]'
  531. '--show-new-leaves[show newly installed leaf packages]'
  532. '--use-host-config[use config files and variables from host system]'
  533. '(- *)--version[show dnf version]'
  534. '(-y --assumeyes --assumeno)'{-y,--assumeyes}'[answer yes for all questions]'
  535. '*'{-x+,--exclude=}'[exclude specified packages from transaction]: : _sequence _dnf5_packages -T all'
  536. )
  537. _arguments -C -s : $opts ': :->command' '*:: :->cmd_args' && ret=0
  538. case $state in
  539. command) _dnf5_commands && ret=0 ;;
  540. cmd_args) _dnf5_subcmds_opts && ret=0 ;;
  541. esac
  542. return ret
  543. }
  544. _dnf5 "$@"