Closed Amorfx closed 1 year ago
Up for my question.
Or did I miss something ? A function ?
We have WP_CLI::confirm()
https://make.wordpress.org/cli/handbook/references/internal-api/wp-cli-confirm/
@danielbachhuber Confirm just allows a barrier to exit the script or not but does not allow you to request information such as a string like "What is your name ?"
@Amorfx Correct. We haven't had a need for that use case, so we haven't implemented it. You're welcome to use whichever external library you'd like for it.
I want to create some commands with WP-CLI but i did not find a function in order to request information by the user.
Is it possible to imagine adding an ask() function used this way:
$someInformation = WP_CLI::ask($question)
like the question helper from Symfony ?