Skip to content

Add dynamic shell completion for --profile and --region#101

Merged
huseyinbabal merged 1 commit intomasterfrom
feature/dynamic-profile-completion
Jan 17, 2026
Merged

Add dynamic shell completion for --profile and --region#101
huseyinbabal merged 1 commit intomasterfrom
feature/dynamic-profile-completion

Conversation

@huseyinbabal
Copy link
Owner

Summary

  • Add custom completion module with scripts for bash, zsh, fish, and PowerShell
  • Add hidden list-profiles and list-regions subcommands used by completion scripts
  • Completions dynamically fetch profiles from ~/.aws/config and ~/.aws/credentials

Usage

# Add to ~/.bashrc (or ~/.zshrc for zsh):
eval "$(taws completion bash)"

# Then use:
taws --profile <TAB>  # Shows: default, production, staging, etc.
taws --region <TAB>   # Shows: us-east-1, us-west-2, eu-west-1, etc.

Supported Shells

  • Bash: Full dynamic completion
  • Zsh: Full dynamic completion with descriptions
  • Fish: Full dynamic completion
  • PowerShell: Full dynamic completion
  • Elvish: Falls back to clap's default static completion

Closes #97

- Add custom completion module with scripts for bash, zsh, fish, and PowerShell
- Add hidden list-profiles and list-regions subcommands for completion scripts
- Completions dynamically fetch profiles from ~/.aws/config and credentials
- Regions are completed from a static list of all AWS regions

Closes #97
@huseyinbabal huseyinbabal merged commit 34d382a into master Jan 17, 2026
4 checks passed
@huseyinbabal huseyinbabal deleted the feature/dynamic-profile-completion branch January 17, 2026 06:59
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.

bash autocompletion

1 participant