INNER CODE UNIT · C#
CommandBuilder
geluk/pass-winmenu · commandline/CommandBuilder.cs:5
public class CommandBuilder
{
private readonly Option<string> configFile;
private CommandBuilder()
{
RootCommand = new RootCommand("Commandline companion to pass-winmenu");
configFile = new Option<string>(
"--config-file",
"Path to the configuration file, relative to the main executable");
var defaultConfigPath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "pass-winmenu.yaml");
configFile.SetDefaultValue(defaultConfigPath);
RootCommand.AddGlobalOption(configFile);
}
private RootCommand RootCommand { get; }
private CommandBuilder AddList()