Warn for unknown options
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- cli
Research direction
Start by locating Citty's CLI option parsing and validation entry point, then trace how an unrecognized option is currently handled. The work is done when unknown options produce a warning similar to the reported example without changing the handling of recognized options.
Written by the indexing model from the issue text.
Description
Describe the feature
Warn for unknown options could improve CLI usability and user experience.
For example, git (and others) warns about unknown options:
$ git -k
> unknown option: -k
> usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
> [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
> [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch]
> [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]
> [--work-tree=<path>] [--namespace=<name>] [--config-env=<name>=<envvar>]
> <command> [<args>]
Additional information
- Would you be willing to help implement this feature?
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from unjs/citty
-
Support alias value with `=` (`-foo=bar`)Possibly taken @guoyangzhen claimed this 223 days ago. Openbug discussion enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
feat(usage): highlight defaultCommand in generated usage outputPossibly taken @jihtsan claimed this 12 days ago. Open
Difficulty 3/5 Half a day Newbie friendliness 45/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Should runCommand forward the selected subcommand result?Possibly taken @abhi-byte62 claimed this 19 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Support a `multiple` Modifier for Arguments (Variadic Flags and Positionals)Possibly taken @LandonSchropp claimed this 105 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 55/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MoonshotAI/kimi-code#4398 ·
Maintainers usually reply within 1 day
-
Xiaomi Mimo语音识别服务异常Openpending triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
package-lock.json : les binaires natifs macOS et Linux de unrs-resolver ont disparu depuis #1823Openbug dependencies
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AxaFrance/design-system#2064 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100