Skip to content

Interactive mode

Adam Bajguz edited this page Aug 18, 2020 · 11 revisions

An interactive mode is a special mode of application, which allows passing multiple commands to the application without exiting the application. To start application in interactive mode simply specify [interactive] directive when running the application. By default applications do no support interactive mode. This can be changes with:

    builder.UseInteractiveMode();

Method UseInteractiveMode automatically adds the following directives: [default], [>], [.], and [..]. If you wish not to add [>], [.], and [..] directives, you can use:

    builder.UseInteractiveMode(addScopeDirectives: false);

Since every empty command in interactive mode will do nothing more than printing a command promt in a new line, a special directive [default] can be used to execute default or scoped command without parameters.

In help view, every command and directive that can be executed only in interactive mode are indicated with @.

When starting the application in interactive mode it is possible to pass a command that will be executed just after startign the applicaton, e.g., [interactive] -h will start the application in interactive mode, print help message, and then show the prompt.

Clone this wiki locally