diff --git a/base/util.jl b/base/util.jl index 7f4300aa4de07..ae0c64bab90a2 100644 --- a/base/util.jl +++ b/base/util.jl @@ -289,7 +289,8 @@ See also `Base.getpass` and `Base.winprompt` for secure entry of passwords. """ function prompt(input::IO, output::IO, message::AbstractString; default::AbstractString="", timeout::Union{Nothing, Int} = nothing) if !isnothing(timeout) && timeout > 0 - msg = !isempty(default) ? "$message [$default] timeout $timeout seconds: " : "$message: " + plural = timeout == 1 ? "" : "s" + msg = !isempty(default) ? "$message [$default] timeout $timeout second$(plural): " : "$message: " timeout_timer = Timer(timeout) else msg = !isempty(default) ? "$message [$default]: " : "$message: "