Skip to content

Commit 2255c7d

Browse files
committed
docs: create docs for default sub command
1 parent b042298 commit 2255c7d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/docs/src/pages/en/features/commander.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ After adding the subcommand to the appropriate module's `providers` array, nest-
176176

177177
Subcommands can also take an `aliases` array for sub command aliases. We could add `aliases: ['f']` to the above `FooCommand` and run it with `my-exec f` instead of `my-exec foo` and get the same result. `aliases` must be passed as an array.
178178

179+
You can also use the `options: { isDefault: true }` option of the`@SubCommand()` decorator to set a default subcommand for the command.
180+
179181
## The Full Command
180182

181183
Let's say all we want to do is have our `my-exec` command run the task in another shell, and that's it. If we take our above command we can see that it can be ran like so

0 commit comments

Comments
 (0)