Method ShowBanner
- Namespace
- Ploch.CommandLine.Spectre
- Assembly
- Ploch.CommandLine.Spectre.dll
ShowBanner(bool)
Sets whether the library writes its own lines to standard error: the start-up banner — the name as FigletText, the name and version line and the description — when ConfigureCommandApp(Action<IConfigurator>) builds the application, and the "Executing command" line before each command. Both are written unless this is called with false.
public AppBuilder ShowBanner(bool show)
Parameters
Returns
- AppBuilder
The current instance of AppBuilder for method chaining.
Examples
using var appBuilder = AppBuilder.Create(args)
.WithName("My Tool")
.ShowBanner(false);
Remarks
Both lines already stay out of standard output, so piping a command's output does not need this. Turn them off for a tool whose standard error is captured as well, or that is invoked by another program. Call it before ConfigureCommandApp(Action<IConfigurator>), which is where the banner is written. Sets ShouldShowBanner.