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 for upgrade-groups #268

Merged

Conversation

gabrielcocenza
Copy link
Member

@gabrielcocenza gabrielcocenza commented Feb 29, 2024

  • added bash completion for data-plane, control-plane and hypervisors
  • added --machine and --availability-zone for hypervisors
  • removed supressed help messages

Closes #63

- added bash completion for data-plane, control-plane and
  hypervisors
- added --machine and --availability-zone for hypervisors
- removed supressed help messages
@gabrielcocenza gabrielcocenza self-assigned this Feb 29, 2024
Copy link
Contributor

@agileshaw agileshaw left a comment

Choose a reason for hiding this comment

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

Some issues with the bash completion. Here are my test results:

# upgrade child command should not show up after control-plane is specified
ubuntu@machine:~/sunbeam-charms$ cou plan control-plane 
--backup       --help         --model        --no-backup    --quiet        --verbose      control-plane  data-plane     hypervisors

# upgrade child command should not show up after data-plane is specified
ubuntu@machine:~/sunbeam-charms$ cou plan control-plane 
--backup       --help         --model        --no-backup    --quiet        --verbose      control-plane  data-plane     hypervisors

# Ideally should also show common args like `--help`, `--quiet`, etc
ubuntu@machine:~/sunbeam-charms$ cou plan hypervisors --
--availability-zone  --machine            

Feel free to refer to the code I shared in #63 (not up to date and may not be perfect, but hopefully would help you with your approach)

completions/bash/cou_bash_completion Outdated Show resolved Hide resolved
completions/bash/cou_bash_completion Outdated Show resolved Hide resolved
completions/bash/cou_bash_completion Outdated Show resolved Hide resolved
completions/bash/cou_bash_completion Outdated Show resolved Hide resolved
- fix to child commands have common options
Copy link
Contributor

@agileshaw agileshaw left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@rgildein rgildein left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants