Ask a question and read from the terminal in interactive scenario
Arguments
- ..., end, level
passed to
cat2
- default
default value to return in case of blank input
Details
The prompt string will ask a question, providing defaults. Users need to enter the answer. If the answer is blank (no space), then returns the default, otherwise returns the user input.
This can only be used in an interactive
session.
Examples
if(interactive()){
ask_or_default('What is the best programming language?',
default = 'PHP')
}