Bug 1938351 - Improve shell completion for dnf (bash, zsh, fish)
Summary: Improve shell completion for dnf (bash, zsh, fish)
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 34
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: dnf-community
TreeView+ depends on / blocked
 
Reported: 2021-03-12 20:44 UTC by Thiago Sueto
Modified: 2022-06-08 00:48 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-08 00:48:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Thiago Sueto 2021-03-12 20:44:25 UTC
Description of problem:

DNF seems to be lacking many shell completions still.
I'm not sure if this should be done downstream (upstream?) to each shell, but here's the current status in comparison to zypper.

Notice how dnf is the only one to not do anything with shell completion, zypper at least do something, regardless of whether it's contextually accurate for zypper to do so.

Actual results:

zypper in q<TAB> = shows packages (bash, zsh, fish) 
dnf install q<TAB> = shows packages (bash, fish), does nothing (zsh)
dnf in q<TAB> = shows packages (bash), does nothing (zsh, fish)

zypper mr <TAB> = shows openSUSE repository IDs (bash), shows flags (zsh), shows all repository IDs (fish)
zypper ar <TAB> = same as mr
zypper rr <TAB> = same as mr
dnf config-manager <TAB> = does nothing (bash, zsh, fish)

zypper packages <TAB> = shows flags (bash, zsh), shows repository IDs (fish)
zypper info <TAB> = shows flags (bash, zsh), lists all packages (fish)
zypper info q<TAB> = shows packages (bash, zsh, fish)
dnf info <TAB> = lists all packages (bash, fish), does nothing (zsh)
dnf info q<TAB> = shows packages (bash, fish), does nothing (zsh)

zypper in --from <TAB> = shows openSUSE repository IDs (bash), shows all repository IDs (zsh, fish)
dnf install --enablerepo <TAB> = shows disabled repository IDs (bash), does nothing (zsh, fish)

Expected results:

dnf install q<TAB> = shows packages
dnf in q<TAB> = shows packages
dnf config-manager <TAB> shows flags OR shows all repository IDs
dnf info <TAB> = lists all packages
dnf info q<TAB> = shows packages
dnf install --enablerepo <TAB> = shows all repository IDs OR shows disabled repository IDs

Additional info:

If anything, I believe config-manager is the most important out of these, as it's the only thing where shell completion does absolutely nothing regardless of shell.

Comment 1 Ben Cotton 2022-05-12 16:30:27 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 2 Ben Cotton 2022-06-08 00:48:13 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.