Skip to content

feat: replace names spec with separate name and short arguments - #8

Merged
bhirsz merged 1 commit into
mainfrom
feat/name-short-api
Aug 28, 2026
Merged

feat: replace names spec with separate name and short arguments#8
bhirsz merged 1 commit into
mainfrom
feat/name-short-api

Conversation

@bhirsz

@bhirsz bhirsz commented Aug 28, 2026

Copy link
Copy Markdown
Member

Stacked on #7.

Replaces the packed names="--long/-s" spec with two explicit arguments:

  • name= — the long option name without dashes (derived from the method name when omitted)
  • short= — the single-character short name (auto-derived from the first letter only when name is not given)

Passing name opts out of the implicit short; add short= to keep one.

Migration (pre-1.0)

Replace names="--console/-c" with name="console", short="c".

Sets up the follow-up PR that adds declarative option(name=..., help=...) class attributes.

@bhirsz
bhirsz force-pushed the feat/name-short-api branch from 184f7ed to 3d923f4 Compare August 28, 2026 12:43
@bhirsz
bhirsz force-pushed the feat/name-short-api branch from 3d923f4 to f918ca3 Compare August 28, 2026 12:46
Base automatically changed from feat/opt-in-env to main August 28, 2026 12:47
Options are now named with two explicit arguments instead of the packed
"--long/-s" spec:

* name= sets the long option name without dashes (e.g. name="console"
  -> --console). Derived from the method name when omitted.
* short= sets the single-character short name (e.g. short="c" -> -c).
  Auto-derived from the first letter only when name is not given, so an
  explicit name opts out of the implicit short.

Migration (pre-1.0, no stability guarantees yet): replace
names="--console/-c" with name="console", short="c".

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bhirsz
bhirsz force-pushed the feat/name-short-api branch from f918ca3 to c014342 Compare August 28, 2026 12:47
@bhirsz
bhirsz merged commit 85e9b03 into main Aug 28, 2026
8 checks passed
@bhirsz
bhirsz deleted the feat/name-short-api branch August 28, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant