Skip to content

fix(completion): enable shell completions in release builds#77

Merged
steipete merged 2 commits intoopenclaw:mainfrom
salmonumbrella:fix/shell-completions-65
Jan 17, 2026
Merged

fix(completion): enable shell completions in release builds#77
steipete merged 2 commits intoopenclaw:mainfrom
salmonumbrella:fix/shell-completions-65

Conversation

@salmonumbrella
Copy link
Copy Markdown
Contributor

Summary

  • Implements working shell completions for bash, zsh, fish, and PowerShell
  • Adds CompletionInternalCmd for kong's __complete helper
  • Refactors completion generation to use kong's built-in support
  • Extracts newParser() for reuse in completion generation

Changes

  • completion.go: Refactored to generate proper shell scripts using kong
  • completion_internal.go: New file implementing __complete subcommand
  • root.go: Added Complete command, extracted newParser() and baseDescription()
  • Tests updated accordingly

Test Plan

  • go test ./... passes
  • gog completion zsh outputs valid zsh completion script
  • gog completion bash outputs valid bash completion script
  • gog completion fish outputs valid fish completion script
  • gog completion powershell outputs valid PowerShell completion script

Fixes #65

🤖 Generated with Claude Code

salmonumbrella and others added 2 commits January 17, 2026 03:24
Implements working shell completions for bash, zsh, fish, and PowerShell.

Changes:
- Add CompletionInternalCmd for kong's __complete helper
- Refactor completion generation to use kong's built-in support
- Extract newParser() for reuse in completion generation
- Add baseDescription() to avoid duplication

The completion command now generates valid scripts that work when
eval'd in the user's shell configuration.

Fixes openclaw#65

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@steipete steipete force-pushed the fix/shell-completions-65 branch from a45eba9 to 410ea2f Compare January 17, 2026 03:28
@steipete steipete merged commit c550930 into openclaw:main Jan 17, 2026
1 check passed
@steipete
Copy link
Copy Markdown
Collaborator

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test (skipped: no package.json), make lint, make test\n- Land commit: 410ea2f\n- Merge commit: c550930\n\nThanks @salmonumbrella!

klodr pushed a commit to klodr/gogcli that referenced this pull request Apr 22, 2026
klodr pushed a commit to klodr/gogcli that referenced this pull request Apr 22, 2026
…ons-65

fix(completion): enable shell completions in release builds
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.

Shell completions documented but not available in release builds

2 participants