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

bash completion replaces underscores with dashes #1235

Closed
noqqe opened this issue Feb 19, 2019 · 1 comment
Closed

bash completion replaces underscores with dashes #1235

noqqe opened this issue Feb 19, 2019 · 1 comment

Comments

@noqqe
Copy link

noqqe commented Feb 19, 2019

Hi,

since I've upgraded to click 7.0 the bash completion replaces underscores (_) in command names with dashes (-)

@click.command(short_help="Delete a group")
@click.option("groupname", '-g', '--group', type=str, required=True)
@click.option("--yes", is_flag=True, default=False)
@click.pass_context
def delete_group(ctx, yes, groupname):
    """
    Deletes a group identified by its short ID

the help message it looks like this:

Options:
  --version                   Show the version and exit.
  -e, --env [prod|stage|dev]  Choose environment to execute commands
  -h, --help                  Show this message and exit.

Commands:
  create_project          Creates a new project
  delete_group            Delete a group
  [...]

Gif example here:
feb-19-2019 10-47-51

@ThiefMaster
Copy link
Member

Click 7 uses dashes instead of underscores in command names (which is actually more common in CLIs). See #1123

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants