feat(cli): allow forms subcommand to accept multiple arguments#2996
feat(cli): allow forms subcommand to accept multiple arguments#2996abhishekDeshmukh74 wants to merge 3 commits intoAutomattic:masterfrom
forms subcommand to accept multiple arguments#2996Conversation
Updated `harper-cli forms` and `just get-forms` to accept multiple word arguments instead of just one. This enables contributors to check inflected forms of several dictionary entries in a single invocation. Closes Automattic#2989
|
Hey thanks for this! I'll give it a proper look over. Did you notice the Rust build is failing. That's usually Clippy wanting different formatting. Before I push to PRs I try to always remember to first run (I checked and this is what's causing the failure this time.) |
Yes done! |
Issues
Closes #2989
Description
This PR allows
harper-cli formsandjust get-formsto accept multiple word arguments instead of just one.Changes:
harper-cli/src/main.rs: Changed theFormsvariant from a singleline: Stringtolines: Vec<String>with#[arg(num_args = 1..)]. The body now iterates over each word, printing a blank line separator between entries.justfile: Updatedget-formsrecipe fromword:(single arg) to+words:(one or more args), and passes{{words}}toharper-cli forms.Before:
After:
Demo
N/A — CLI-only change, no visual UI changes.
How Has This Been Tested?
just precommit.Checklist