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.

Add option to set up command alias

See original GitHub issue

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

Commander supports command aliases out of the box. Currently, we need to get the commander instance to add an alias to a command

Describe the solution you’d like

@SubCommand({
  name: 'migration',
  alias: 'mi',
  description: 'generate a db migration'
})
export class MigrationGeneratorCommand implements CommandRunner {
...

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

command aliases is pretty common use case for generators

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jmcdo29commented, Apr 15, 2022

I think I’d rather we have name be a string as the main name of the command, and allow for an aliases where we do aliases.forEach(alias => command.alias(alias)). I think it’ll fair better with the --help command as well

0reactions
jmcdo29commented, Apr 19, 2022

Added support in 2.5.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create and Use Alias Command in Linux - Tecmint
What you need to do is type the word alias then use the name you wish to use to execute a command followed...
Read more >
Linux alias Command: How to Use It With Examples
Create a Temporary Alias in Linux ... Note: The alias command allows you to include multiple commands as the value by dividing them...
Read more >
alias command in Linux with Examples - GeeksforGeeks
alias command instructs the shell to replace one string with another string while executing the commands. When we often have to use a...
Read more >
How to create an alias in Linux | Enable Sysadmin - Red Hat
How to create an alias in Linux. Learn how to create shortcuts at the terminal to your most-used commands to save you time...
Read more >
Linux Alias Command: Set, Create and Remove Aliases
How to create alias in Linux · The substituted command is always used under the inverted commas ('). · There must be no...
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