Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completions for 'alternatives' command are broken #1225

Closed
3 tasks done
siteshwar opened this issue Jun 24, 2024 · 1 comment · Fixed by #1239
Closed
3 tasks done

Completions for 'alternatives' command are broken #1225

siteshwar opened this issue Jun 24, 2024 · 1 comment · Fixed by #1239
Assignees

Comments

@siteshwar
Copy link

Describe the bug

Completions for 'alternatives' command are broken.

To reproduce

These are the steps to reproduce on Fedora:

  1. Ensure bash-completion package is installed.
  2. Type alternatives <TAB>.

Expected behavior

Different options supported by alternatives command should be listed.

Versions (please complete the following information)

  • Operating system name/distribution and version: Fedora release 41 (Rawhide)
  • bash version, echo "$BASH_VERSION": 5.2.26(1)-release
  • bash-completion version, (IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"): 2.13.0
@akinomyoga
Copy link
Collaborator

Option names are supposed to be generated by _comp_compgen_help

but the output of alternatives --help is not in a format parsed by _comp_compgen_help:

$ alternatives --help
alternatives version 1.26 - Copyright (C) 2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.

usage: alternatives --install <link> <name> <path> <priority>
                    [--initscript <service>]
                    [--family <family>]
                    [--follower <follower_link> <follower_name> <follower_path>]*
       alternatives --remove <name> <path>
       alternatives --auto <name>
       alternatives --config <name>
       alternatives --display <name>
       alternatives --set <name> <path/family>
       alternatives --list
       alternatives --remove-all <name>
       alternatives --add-follower <name> <path> <follower_link> <follower_name> <follower_path>
       alternatives --remove-follower <name> <path> <follower_name>

common options: --verbose --test --help --usage --version --keep-missing --keep-foreign
                --altdir <directory> --admindir <directory>

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 a pull request may close this issue.

2 participants