From ce9a4a0196a372b153a592ecd61b728cd88bb767 Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Sun, 26 Jan 2025 14:21:14 +0100 Subject: [PATCH] feat(dnf): add `dnf5` completion Closes #12939 --- plugins/dnf/_dnf5 | 570 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 570 insertions(+) create mode 100644 plugins/dnf/_dnf5 diff --git a/plugins/dnf/_dnf5 b/plugins/dnf/_dnf5 new file mode 100644 index 00000000..e194dd5a --- /dev/null +++ b/plugins/dnf/_dnf5 @@ -0,0 +1,570 @@ +#compdef dnf5 +# based on dnf-5.2.6.2 + +# utility functions + +_dnf5_helper() { + _call_program specs $service "${(q-)@}" "${(q-)PREFIX}\*" \ + -qC --assumeno --nogpgcheck 2>/dev/null command' '*:: :->cmd_args' && ret=0 + + case $state in + command) _dnf5_commands && ret=0 ;; + cmd_args) _dnf5_subcmds_opts && ret=0 ;; + esac + return ret +} + +_dnf5 "$@"