Skip to content

Conversation

@schoolboyqueue
Copy link

Summary

Add custom completion generators for shells not natively supported by Cobra:

  • Nushell: Generates native extern definitions that integrate with nushell's completion system
  • Carapace: Generates YAML spec file for use with carapace-bin, enabling completions for Elvish, Ion, Oil, Tcsh, Xonsh, and other shells

Changes

  • Add internal/cli/admin/completion_generators.go with custom generators
  • Register new nushell and carapace subcommands under completion
  • Add comprehensive tests for both generators
  • Update docs/public/SHELL-COMPLETION.md with setup instructions

Test plan

  • All existing completion tests pass
  • New tests verify nushell extern format output
  • New tests verify carapace YAML spec output
  • make lint passes
  • make test passes
  • make build passes

Usage

# Generate Nushell completions
autospec completion nushell > ~/.cache/autospec/completions.nu

# Generate Carapace spec
autospec completion carapace > ~/.config/carapace/specs/autospec.yaml

Add custom completion generators for shells not supported by Cobra:
- nushell: generates native extern definitions
- carapace: generates YAML spec for multi-shell support via carapace-bin

Update documentation with setup instructions for both formats.
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.

1 participant