Skip to content

Commit

Permalink
fix: add other aliases for version flag (#229)
Browse files Browse the repository at this point in the history
Add `version`, `v`, and `-v` aliases for the version display command.

Minor refactoring: updated the base class used on the `help` command.
  • Loading branch information
eliasmpw committed Sep 8, 2023
1 parent 27cfba9 commit 89dbf51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
"typescript": "^5.0.4"
},
"oclif": {
"additionalVersionFlags": ["version", "v", "-v"],
"bin": "archway",
"dirname": "archway",
"commands": "./dist/commands",
Expand Down
9 changes: 4 additions & 5 deletions src/commands/help.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Command } from '@oclif/core';

import Help from '@/plugins/help-plugin/help';
import { BaseCommand } from '@/lib/base';
import HelpPlugin from '@/plugins/help-plugin/help';

/**
* Command 'help'
* Displays the help info
*/
export default class Config extends Command {
export default class Help extends BaseCommand<typeof Help> {
static summary = 'Display help for archway.';

/**
Expand All @@ -15,7 +14,7 @@ export default class Config extends Command {
* @returns Empty promise
*/
public async run(): Promise<void> {
const help = new Help(this.config, { all: true });
const help = new HelpPlugin(this.config, { all: true });
await help.showHelp(this.argv);
}
}

0 comments on commit 89dbf51

Please sign in to comment.