Closed gugglegum closed 3 years ago
Have you tried using defaultTo() with an input?
$default = '/home/user/.ssh/id_rsa';
$input = $climate->input('Enter the path of rsa key (' . $default . '): ');
$input->defaultTo($default);
$response = $input->prompt();
Sometimes it is useful to allow user select default variant just by pressing ENTER. And variants should be printed after question in brackets. For example:
Are you sure? [y/N]
Here uppercaseN
means this is default answer. Or:Enter the path of rsa key (/home/user/.ssh/id_rsa):