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

feat(cli): Add namespace in command autocompletion bash #3927

Merged
merged 1 commit into from
Dec 19, 2022

Conversation

gansheer
Copy link
Contributor

Fixes #3922

Motivation

Make the autocompletion internal kubectl command and the CLI kamel command as consistant as possible in regards of namespace declaration.

Description

  • retrieve the namespace flag from the current command
  • retrieve the namespace config with the kamel config --list command only if awk is available
  • apply the namespace to the kubectl autocompletion command : flag namespace > config namespace > no specified namespace

The generated completion script was tested on Linux Fedora OS bash.

Closes: #3922

Release Note

Use flag/config namespace for existing CLI completion kubectl commands

* retrieve the namespace flag from the current command
* retrieve the namespace config with the `kamel config --list` command only if awk is available
* apply the namespace to the kubectl autocompletion command : flag namespace > config namespace > no specified namespace

Closes: apache#3922
@tadayosi tadayosi merged commit 4ff1b56 into apache:main Dec 19, 2022
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.

Use flag/config namespace for existing CLI completion kubectl commands
3 participants