Skip to content

Conversation

@integrii
Copy link
Owner

@integrii integrii commented Oct 4, 2025

Summary

  • add fish, PowerShell, and Nushell completion generators that traverse parser state to emit shell-specific scripts
  • document the expanded completion support in the README
  • expand completion tests to validate outputs for bash, zsh, fish, PowerShell, and Nushell across shared sample commands

Testing

  • go test ./...
  • go vet ./...

https://chatgpt.com/codex/tasks/task_e_68e0a4f789748323892f10f75ffc6511

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

flaggy/parser.go

Lines 141 to 150 in 6b9a8a1

// Completion takes in a shell type and outputs the completion script for
// that shell.
func (p *Parser) Completion(completionType string) {
switch {
case strings.ToLower(completionType) == "bash":
fmt.Print(GenerateBashCompletion(p))
case strings.ToLower(completionType) == "zsh":
fmt.Print(GenerateZshCompletion(p))
default:
fmt.Fprintf(os.Stderr, "Unsupported shell specified for completion: %s\n", completionType)

P1 Badge Extend Parser.Completion to route new shells

The commit advertises fish, PowerShell, and Nushell completions and README examples now call ./app completion fish etc., but Parser.Completion still only handles bash and zsh and prints an "Unsupported shell" error for all other values. As a result the public API and CLI entry point cannot emit the new scripts even though the generators exist, so the documented commands will fail. Consider adding branches for the new shells in this switch.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

@integrii
Copy link
Owner Author

integrii commented Oct 4, 2025

@codex address the problem of 'unsupported shell' being returned for the new shell completion types by the subcommand parser. Add a test that directly tests the triggering of each autocomplete call and verifies the output.

@chatgpt-codex-connector
Copy link

Summary

Testing

  • go test ./...
  • go vet ./...
  • ⚠️ goimports -w parser.go parser_completion_test.go (not available in container)

View task →

@integrii integrii merged commit 1ec8867 into master Oct 4, 2025
1 check passed
@integrii integrii deleted the codex/add-shell-auto-completion-support branch October 4, 2025 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants