Skip to content

feat: add completion for context flag - #497

Merged
nieomylnieja merged 1 commit into
mainfrom
add-completion-to-config-contexts
Jul 1, 2026
Merged

feat: add completion for context flag#497
nieomylnieja merged 1 commit into
mainfrom
add-completion-to-config-contexts

Conversation

@nieomylnieja

Copy link
Copy Markdown
Collaborator

Motivation

Context completion is a small usability improvement for users who switch between configured sloctl contexts.

Summary

Added shell completion for the global --context flag by loading context names from the active sloctl config.
Shared config path resolution between config commands and completion so the flag, environment variable, and default path behave consistently.
Added Bats unit coverage for listing and prefix-filtering context completions.

Testing

Added Bats unit tests for --context completion with all contexts and prefix-filtered contexts.

@github-actions github-actions Bot added enhancement New feature or request go minor labels Jun 30, 2026
@nieomylnieja
nieomylnieja enabled auto-merge (squash) June 30, 2026 15:36
@nieomylnieja
nieomylnieja disabled auto-merge July 1, 2026 10:47
@nieomylnieja
nieomylnieja merged commit 1ac45bc into main Jul 1, 2026
5 checks passed
@nieomylnieja
nieomylnieja deleted the add-completion-to-config-contexts branch July 1, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants