Skip to content

Commit e2e8369

Browse files
fuguiKzphil-scott-78
authored andcommitted
docs(cli): explain AddBranch<TSettings> requirement
1 parent c75a9e0 commit e2e8369

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Spectre.Docs/Content/cli/how-to/working-with-multiple-command-hierarchies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ T:Spectre.Docs.Cli.Examples.DemoApps.CommandHierarchies.RemoteListSettings
3535

3636
The `--verbose` flag is now available on all remote subcommands, and can be specified either before or after the subcommand name: `myapp remote --verbose add origin https://...` or `myapp remote add origin https://... --verbose`.
3737

38-
Tip: even if a subcommand doesn't add any extra arguments/options (like `list`), give it a dedicated settings type that inherits from the branch settings (for example, `RemoteListSettings : RemoteSettings`).
38+
Rule: when you use `AddBranch<TSettings>`, each subcommand's settings type should inherit from `TSettings`. Even if a subcommand doesn't add any extra arguments/options (like `list`), give it a dedicated settings type (for example, `RemoteListSettings : RemoteSettings`).
3939

4040
## Nest Multiple Levels
4141

0 commit comments

Comments
 (0)