Skip to content

Interactive mode

Adam Bajguz edited this page Apr 5, 2021 · 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: [!], [>], [.], and [..].

  • If you wish not to add [>], [.], and [..] directives, you can use:
    builder.UseInteractiveMode(addScopeDirectives: false);
    builder.UseInteractiveMode(useAdvancedInput: false);

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

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 starting the application, e.g., [interactive] -h will start the application in interactive mode, print help message, and then show the prompt.

Clone this wiki locally