in TeamCity.CSharpInteractive/Info.cs [88:182]
public void ShowHelp() =>
_stdOut.WriteLine(
new []
{
new[]
{
Text.NewLine,
new("Usage:", Color.Header),
new(" dotnet csi [options] [--] [script] [script arguments]"), Text.NewLine,
Text.NewLine,
new("Executes a script if specified, otherwise launches an interactive REPL (Read Eval Print Loop)."),
Text.NewLine,
Text.NewLine
},
Option(
"script",
new Text("The path to the script file to run."),
Text.NewLine, Text.Tab,
new Text("If no such file is found, the command will treat it as a directory"),
Text.NewLine, Text.Tab,
new Text("and look for a single script file inside that directory.")),
Option(
"script arguments",
new Text("Script arguments are accessible in a script via the global list "),
new Text("Args[index]", Color.Details),
new Text(" by an argument index.")),
Option("--", new Text("Indicates that the remaining arguments should not be treated as options.")),
Option(
"--help",
new Text("Display this usage message (alternative forms: /? -h /h /help).")),
Option("--version", new Text("Display the version and exit (alternative form: /version).")),
Option("--source <NuGet package source>", new Text("NuGet package source (URL, UNC/folder path) to use (alternative forms: -s /source /s),"),
Text.NewLine, Text.Tab,
new Text("for example: "),
new Text("--source https://api.nuget.org/v3/index.json", Color.Details)),
Option("--property <key=value>[;<keyN=valueN>]",
new Text("Define a key-value pair(s) for the script properties "),
new Text("(*1)", Color.Highlighted),
new Text(" accessible in scripts."),
Text.NewLine, Text.Tab,
new Text("Alternative forms:"),
Text.NewLine, Text.Tab, Text.Tab,
new Text("-property"),
Text.NewLine, Text.Tab, Text.Tab,
new Text("-p"),
Text.NewLine, Text.Tab, Text.Tab,
new Text("/property"),
Text.NewLine, Text.Tab, Text.Tab,
new Text("/p"),
Text.NewLine, Text.Tab,
new Text("Specify each property separately, or use a semicolon or comma to separate multiple properties,"),
Text.NewLine, Text.Tab,
new Text("as the following example shows: "),
new Text("--property key1=val1;key2=val2", Color.Details)),
Option("--property:<key=value>[;<keyN=valueN>]",
new Text("Define a key-value pair(s) in MSBuild style for the script properties "),
new Text("(*1)", Color.Highlighted),
new Text(" accessible in scripts."),
Text.NewLine, Text.Tab,
new Text("Alternative forms:"),
Text.NewLine, Text.Tab, Text.Tab,
new Text("-property:<key=value>"),
Text.NewLine, Text.Tab, Text.Tab,
new Text("-p:<key=value>"),
Text.NewLine, Text.Tab, Text.Tab,
new Text("/property:<key=value>"),
Text.NewLine, Text.Tab, Text.Tab,
new Text("/p:<key=value>"),
Text.NewLine, Text.Tab,
new Text("Specify each property separately, or use a semicolon or comma to separate multiple properties,"),
Text.NewLine, Text.Tab,
new Text("as the following example shows: "),
new Text("--property:key1=val1;key2=val2", Color.Details)),
Option("@<file>", new Text("Read response file for more options as the following example shows: "),
new Text("@OptionsDir/MyOptions.rsp", Color.Details)),
new[]
{
new("Notes:", Color.Header),
Text.NewLine,
Text.Tab,
new("- "),
new("*1", Color.Highlighted),
new(" script properties are accessible a script via the global dictionary "),
new("Props[\"name\"]", Color.Details),
new(" by a property name"),
Text.NewLine,
Text.Tab,
new("- "),
new("using HostApi;", Color.Details),
new Text(" directive in a script allows you to use host API types"),
Text.NewLine,
Text.Tab,
new Text(" without specifying the fully qualified namespace of these types")
}
}.SelectMany(i => i).ToArray()