Skip to content

Shell completion: use space for all options#2647

Open
Userfrom1995 wants to merge 1 commit intorpm-software-management:mainfrom
Userfrom1995:autocomplete
Open

Shell completion: use space for all options#2647
Userfrom1995 wants to merge 1 commit intorpm-software-management:mainfrom
Userfrom1995:autocomplete

Conversation

@Userfrom1995
Copy link
Copy Markdown
Contributor

Shell completion now uses a space for long options that require an argument instead of '='.
Space is now used for both long and short options, regardless of whether they require an argument.

Fixes: #2609

@Userfrom1995 Userfrom1995 requested a review from a team as a code owner March 10, 2026 20:22
@Userfrom1995 Userfrom1995 requested review from dcantrell and removed request for a team March 10, 2026 20:22
if (add_description) {
std::string extended_name = name;
if (opt->get_has_value()) {
extended_name += '=';
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.

If we no longer complete the = perhaps it shouldn't also be shown in the description/help? So that it matches with the form the user will use.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's still supposed to be valid and supported. This is just changing the style of export for the tab completion.

Shell completion now uses a space for long options that require an argument instead of '='.
Space is now used for both long and short options, regardless of whether they require an argument.

Fixes: rpm-software-management#2609
Assisted-by: Claude Sonnet 4.6
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.

CLI autocompletion should not print equals sign =

3 participants