Skip to content

feat: accept --networks as an alias of --network - #29

Merged
ScreamingHawk merged 1 commit into
masterfrom
networks-alias
Oct 6, 2026
Merged

ScreamingHawk merged 1 commit into
masterfrom
networks-alias

Conversation

@ScreamingHawk

@ScreamingHawk ScreamingHawk commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

This PR prevents my own idiocy...

--networks now works anywhere --network does (run, dry-run, etherscan). Typing the plural is too easy.

mapAliases in src/index.ts rewrites aliased long flags in argv before commander parses them, covering both --networks x and --networks=x. Commander 11 can't give a long option a second name, so this is the smallest way to do it. Adding another alias is one entry in OPTION_ALIASES.

Things to watch:

  • The alias is hidden: --help only shows --network.
  • The rewrite runs on all of argv, so an option value that is literally --networks gets rewritten too.

@miguelmota

Copy link
Copy Markdown
Member

LGTM!

@ScreamingHawk
ScreamingHawk merged commit 4c4f8db into master Oct 6, 2026
7 checks passed
@ScreamingHawk
ScreamingHawk deleted the networks-alias branch October 6, 2026 20:17
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.

2 participants