feat: improve help system with git-like format and dynamic generation#98
Merged
feat: improve help system with git-like format and dynamic generation#98
Conversation
Enable running worktree commands directly through daft subcommands: - daft worktree-clone, daft worktree-checkout, daft worktree-prune, etc. Add get_clap_args() helper in lib.rs to handle argument parsing for both symlink invocation (git-worktree-clone) and subcommand invocation (daft worktree-clone). Update all worktree commands to use this helper. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace static help strings in docs.rs with dynamic generation using clap's CommandFactory trait. This ensures command descriptions stay in sync with individual command help and adds missing commands: - worktree-flow-adopt, worktree-flow-eject - daft branch, daft multi-remote, daft setup shortcuts - daft shell-init, daft completions, daft man Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When running 'daft' directly, the usage line now shows 'daft worktree-<command>' instead of 'git-worktree-<command>'. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <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
daftorgit daftwithout argumentsdaft worktree-<command>invocation style alongsidegit worktree-<command>worktree-flow-adopt,worktree-flow-eject,daft branch,daft multi-remote,daft setup shortcuts,daft shell-init,daft completions,daft manTest plan
cargo buildsucceedscargo clippy -- -D warningspassescargo fmt -- --checkpassesjust test-unitpasses./target/debug/daftshows git-like help with all commands./target/debug/git-daftshows help withgit worktree-<command>as primary usage🤖 Generated with Claude Code