Open
Conversation
Add `polymarket completions <shell>` subcommand that generates shell completion scripts for bash, zsh, fish, elvish, and PowerShell using clap_complete. Usage: polymarket completions bash >> ~/.bashrc polymarket completions zsh >> ~/.zshrc polymarket completions fish > ~/.config/fish/completions/polymarket.fish Fixes Polymarket#34 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
polymarket completions <shell>subcommand that generates shell completion scripts usingclap_complete.Fixes #34
Usage
Supported shells:
bash,zsh,fish,elvish,powershell.Changes
Cargo.tomlclap_complete = "4"dependencysrc/main.rsCompletionssubcommand withShellargument andclap_complete::generatehandlerTest plan
cargo fmt --checkpassescargo clippy -- -D warningspassescargo test— all 131 tests pass (82 unit + 49 integration)polymarket completions bashoutputs valid completion scriptpolymarket completions zshoutputs valid completion scriptThis contribution was developed with AI assistance (Claude Code).
Note
Low Risk
Adds an optional CLI subcommand and a dependency; no changes to trading/auth flows or data handling.
Overview
Adds a new
polymarket completions <shell>subcommand that prints shell completion scripts to stdout viaclap_complete::generate.Wires in the new
clap_completedependency (and lockfile updates) and updates CLI parsing to exposeShellas an argument for completion generation.Written by Cursor Bugbot for commit cc5cbfb. This will update automatically on new commits. Configure here.