Skip to content

New upcoming hidden option in Click.Option is not hidden from bash completion #1058

Closed

Description

@hirenvadalia

Thanks for wonderful package.

I don't know whether this is intended behavior or not but I was just trying out new upcoming release 7.0 for hidden option and autocompletion to Click.Option and hidden option hides option from help message but it shows up in bash completion.
However it will be good if we can hide it from bash completion also, so that hidden option is actually hidden from everywhere.

Activity

  1. davidism commented on Jul 2, 2018

    @davidism
    Member
  2. stopthatcow commented on Jul 2, 2018

    @stopthatcow
    Contributor

    Should be a simple fix. I will take a look this evening.

  3. self-assigned this
    on Jul 2, 2018
  4. added this to the 7.0 milestone on Jul 2, 2018
  5. stopthatcow commented on Jul 3, 2018

    @stopthatcow
    Contributor

    So there is a choice to be made here about behavior. If a param is hidden I agree that tab completions shouldn't reveal the presence of this parameter if it is partially typed in but once a user types it in fully should click allow autocompletion of the parameter's possible values? I lean toward yes, because once a user has typed in the parameter they wish to use it and it should no longer act as "hidden". The same goes for commands and sub commands that are hidden. If a command group is marked as hidden it should not show up un completion results when partially typed in but once typed in all commands under it should complete as normal. I have a prototyped branch working with this behavior, will finish it up tomorrow, rebase and submit a PR.

  6. davidism commented on Jul 3, 2018

    @davidism
    Member

    Yes, only stop completion of the token itself.

  7. stopthatcow commented on Jul 4, 2018

    @stopthatcow
    Contributor

    See #1061.

  8. added a commit that references this issue on Sep 12, 2018
    752c5e4
  9. added 2 commits that reference this issue on Oct 8, 2018
  10. added a commit that references this issue on Oct 29, 2018
  11. locked as resolved and limited conversation to collaborators on Nov 13, 2020
  12. added
    shell completion
    on Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

shell completion

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions