question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename `alias` option to `shortFlag`

See original GitHub issue

I never liked the alias wording, which was inherited from minimist. I think it would be better to have a more explicit and semantic name called shortFlag.

We could then also add a aliases option where users can specify actual aliases and not just limited to one:

{
	flags: {
		unicorn: {
			type: 'string',
			default: 'love',
			shortFlag: 'u',
			aliases: [
				'--rainbow',
				'-r'
			]
		}
	}
}

Could use some feedback on this proposal.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:6
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
sindresorhuscommented, Feb 18, 2019

@LitoMore It’s not. shortFlag is there to semantically indicate what’s the short version of the flag. aliases is just any kind of alias long/short/medium/thin/thick/unicorny. This distinction will be especially important when we start generating the help output.

1reaction
sindresorhuscommented, Dec 22, 2019

@BendingBender That would be a big breaking change and IMHO not for the better. I also want to make a clear distinction between an alias and a short-flag.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issuehunt
Rename `alias` option to `shortFlag` #109. sindresorhus posted onGitHub. I never liked the alias wording, which was inherited from minimist .
Read more >
Rename aliases - Documentation - Devart
In the SQL code editor, place the cursor over the alias you want to rename and use one of the following options: Right-click...
Read more >
meow - Bountysource
I think it would be better to have a more explicit and semantic name called shortFlag . We could then also add a...
Read more >
Commands - fish shell
alias alias [OPTIONS] NAME DEFINITION alias [OPTIONS] NAME=DEFINITION ... A / if the short flag can be used by someone invoking your command...
Read more >
Create Aliases to Rename Members in the View - Tableau Help
In this article. Create an alias; When the Alias option is not available; Measures can't be re-aliased; Published data sources; Bulk re-aliasing. Contents....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found