From de08dc7345607895f3a6c23db579187fc35b0436 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Mon, 30 Oct 2023 15:21:13 +0800 Subject: [PATCH 1/2] correct bash completion Run `rpm-ostree -' with bash completion, an invalid `-q,' was found [root@localhost ~]# rpm-ostree - --help --version -q, Signed-off-by: Hongxu Jia --- completion/rpm-ostree | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completion/rpm-ostree b/completion/rpm-ostree index 6251881450..2ee127c384 100644 --- a/completion/rpm-ostree +++ b/completion/rpm-ostree @@ -30,7 +30,7 @@ _rpmostree_get_completion() then if [ -z "${_rpmostree_command_completions:-}" ] then - declare _rpmostree_command_completions="$(rpm-ostree --help | grep -e '^ ' | grep -v 'rpm-ostree' | sed 's/-h, //' | awk '{print $1}')" + declare _rpmostree_command_completions="$(rpm-ostree --help | grep -e '^ ' | grep -v 'rpm-ostree' | sed 's/-., //' | awk '{print $1}')" fi COMPREPLY=( $(compgen -W "${_rpmostree_command_completions}" -- "${cur}") ) fi From 14abd99e22c03d5d22ecef0461f31db1322a08f6 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Mon, 30 Oct 2023 15:34:04 +0800 Subject: [PATCH 2/2] src/app/libmain.cxx: correct output of rpm-ostree compose -h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Need append a space between container-encapsulate and Generate in rpm-ostree compose -h ... $ rpm-ostree compose -h [root@localhost ~]# rpm-ostree compose -h Usage: rpm-ostree compose [OPTION…] COMMAND Commands to compose a tree Builtin "compose" Commands: commit Commit a target path to an OSTree repository container-encapsulateGenerate a reproducible "chunked" container image(using RPM data) from an OSTree commit ... It also corrected the bash completion of `rpm-ostree compose' ... [root@localhost ~]# rpm-ostree compose --help image --quiet install commit postprocess container-encapsulateGenerate tree extensions [root@localhost ~]# rpm-ostree compose ... Signed-off-by: Hongxu Jia --- src/app/libmain.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/libmain.cxx b/src/app/libmain.cxx index d30c711c93..c43276f14d 100644 --- a/src/app/libmain.cxx +++ b/src/app/libmain.cxx @@ -209,7 +209,7 @@ option_context_new_with_commands (RpmOstreeCommandInvocation *invocation, gboolean hidden = (command->flags & RPM_OSTREE_BUILTIN_FLAG_HIDDEN) > 0; if (!hidden) { - g_string_append_printf (summary, "\n %-17s", command->name); + g_string_append_printf (summary, "\n %-23s", command->name); if (command->description != NULL) g_string_append_printf (summary, "%s", command->description); }