Naming convention: argument vs option
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
What is the standard name for an argument in coreutils?
GNU coreutils uses:
- 'option' for the named arguments
- 'argument' for the value of an 'option'
- 'operand' for arguments, which are not an option, typically file names
uutils uses:
- generally 'option' for the named arguments
- argument for the operands (see ls --help)
- no known name for named option arguments
This here seem wrong in any case:
When I look at the clap error messages, the word argument is used instead:
Common clap error messages
clap-error-unexpected-argument = { $error_word }: unexpected argument '{ $arg }' found
clap-error-unexpected-argument-simple = unexpected argument
clap-error-similar-argument = { $tip_word }: a similar argument exists: '{ $suggestion }'
clap-error-pass-as-value = { $tip_word }: to pass '{ $arg }' as a value, use '{ $tip_command }'
clap-error-invalid-value = { $error_word }: invalid value '{ $value }' for '{ $option }'
clap-error-value-required = { $error_word }: a value is required for '{ $option }' but none was supplied
clap-error-missing-required-arguments = { $error_word }: the following required arguments were not provided:
clap-error-possible-values = possible values
clap-error-help-suggestion = For more information, try '{ $command } --help'.
In my humble opinion, these should be changed to "option", so it matches GNU outcome: "unexpected option xxx found".
Contributor guide
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.
Research direction
Start by locating the clap error-message localization strings listed in the issue and review how coreutils distinguishes options, arguments, and operands. Check the surrounding terminology and existing tests, then update only the inconsistent wording if the project’s convention is confirmed and verify the affected CLI error output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100