klmr / klmr/sys

Specify option arguments as "short":"long" instead of two separate arguments.

Open
#16 0 comments 0 reactions 1 assignee Claimed by @klmr View on GitHub
enhancement
Dominant language
R
Stars
13
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Specify option arguments as `"short":"long"` instead of two separate arguments:

``` r
# Before:
opt(long = 'long', description = 'a long argument')
opt('s', '', 'a short argument')
opt('b', 'both', 'both forms')

# After:
opt('long', 'a long argument')
opt('s', 'a short argument')
opt('b' : 'both', 'both forms')
```

That way, one of the spellings can be left off easily without having to specify the names of all subsequent arguments, or specifying an empty string argument.

**This is a breaking change!**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.