browserLauncherOption

fun CliktCommand.browserLauncherOption(default: BrowserLauncher = NoneBrowserLauncher(), shouldValidate: () -> Boolean = { true }, envLookup: (String) -> String? = System::getenv): OptionDelegate<out BrowserLauncher?>

Option to select a browser launcher from the CLI, with validation and support of selection by name, path, or fixed choices.

Parameters

default

the default browser launcher to use if no choice is made

shouldValidate

whether the choice should be validated

envLookup

function to look up environment variable values. If different from System::getenv, it can be used for testing purposes