Make minor change to interactive prompt style

This commit is contained in:
Chris de Graaf 2017-09-04 19:00:18 +01:00
parent fcf435d7ec
commit bc21eca106
3 changed files with 5 additions and 5 deletions

View File

@ -94,7 +94,7 @@ pattern. They can implement [`gen_plugin`](@ref), [`badges`](@ref), and
"You got lucky with {{PKGNAME}}, {{USER}}!",
template,
)
gen_file(joinpath(dir, ".myplugin.yml"), text)
gen_file(joinpath(dir, pkg_name, ".myplugin.yml"), text)
else
println("Maybe next time.")
end
@ -246,14 +246,14 @@ function interactive(
# "MyPlugin" to be called "myplugin.yml".
fn = file != nothing && isempty(file) ? "$(lowercase(plugin_name)).yml" : file
default_config_file = fn == nothing ? fn : joinpath(DEFAULTS_DIR, fn)
print("Enter the config template filename for $plugin_name (\"None\" for no file) ")
print("$plugin_name: Enter the config template filename (\"None\" for no file) ")
if default_config_file == nothing
print("[None]: ")
else
print("[$(replace(default_config_file, homedir(), "~"))]: ")
end
config_file = readline()
config_file = if config_file == "None"
config_file = if uppercase(config_file) == "NONE"
nothing
elseif isempty(config_file)
default_config_file

View File

@ -61,6 +61,6 @@ end
function interactive(plugin_type::Type{<:Documenter})
plugin_name = split(string(plugin_type), ".")[end]
print("Enter any Documenter asset files for $plugin_name (separated by spaces) []: ")
print("$plugin_name: Enter any Documenter asset files (separated by spaces) []: ")
return plugin_type(; assets=String.(split(readline())))
end

View File

@ -23,7 +23,7 @@ adds appropriate badges to the README, and updates the `.gitignore` accordingly.
end
end
function badges(_::GitHubPages, user::AbstractString, pkg_name::AbstractString)
function badges(::GitHubPages, user::AbstractString, pkg_name::AbstractString)
return [
format(Badge(
"Stable",