Skip to content

Enhancements in help message and bash completions#555

Merged
oliverkurth merged 4 commits intovmware:devfrom
sshedi:enhancements
Jan 23, 2026
Merged

Enhancements in help message and bash completions#555
oliverkurth merged 4 commits intovmware:devfrom
sshedi:enhancements

Conversation

@sshedi
Copy link
Copy Markdown
Contributor

@sshedi sshedi commented Dec 20, 2025

No description provided.

@oliverkurth
Copy link
Copy Markdown
Contributor

I still see a few misalignments:

...
--refresh                  Refresh repository metadata before operation
                            Example: tdnf --refresh install package
...
--sec-severity <level>     Filter by security severity (Critical|Important|Moderate|Low)
                           Example: tdnf updateinfo --sec-severity=Critical
--security                  Only show security updates
                            Example: tdnf --security update
--setopt <option>=<value>  Set configuration option
                            Example: tdnf --setopt=keepcache=1 install package
--skip-broken              Skip packages with broken dependencies
                           Example: tdnf --skip-broken install pkg

There are more, just check.

Typo also:

--download-path <dir>      Directory to download packages to
                            Exampl tdnf reposync --download-path=/mnt/repo

I will install it also, to see if tab completion works as expected.

Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread tools/cli/lib/help.c Outdated
Comment thread tools/cli/lib/help.c Outdated
Comment thread tools/cli/lib/help.c Outdated
Comment thread tools/cli/lib/help.c Outdated
@sshedi
Copy link
Copy Markdown
Contributor Author

sshedi commented Jan 8, 2026

Thanks for the review. Fixed everything I caught, PTAL again.

Comment thread etc/bash_completion.d/tdnf-completion.bash
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Copy link
Copy Markdown
Contributor

@oliverkurth oliverkurth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good (thank you!), but I have one more suggestion: use repoquery --qf instead of awk and cut for list commands. I didn't suggest this earlier because it requires tdnf >= 3.6, but I realized that that is actually fine.

Also, I realized that we should have a simpler output version for repolist, and a way to get the current history count number. We can add that in another change.

Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
;;
downgrade)
opts=$(tdnf list --downgrades | awk '{print $1}' | cut -d'.' -f1)
opts=$(tdnf list --downgrades 2>/dev/null | awk '{print $1}' | cut -d'.' -f1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use repoquery here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was missing, I added this support to repoquery.

Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Comment thread etc/bash_completion.d/tdnf-completion.bash Outdated
Signed-off-by: Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>
Signed-off-by: Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>
Currently `tdnf repoquery --upgrades` shows the entire list of packages
instead of just showing uavailable updates, this patch fixes it.

Signed-off-by: Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>
Signed-off-by: Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>
@oliverkurth
Copy link
Copy Markdown
Contributor

Thank you, looks good!

@oliverkurth oliverkurth merged commit 92a1e88 into vmware:dev Jan 23, 2026
8 checks passed
@sshedi sshedi deleted the enhancements branch January 27, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants