Error & Suggest different flag name to user
cmd_help_flags_suggest(suggest_names)
suggest_names | named character vector, names correspond to original value, values correspond to suggested replacement. |
---|
error message suggesting alternatives to user
user_flags <- list("output", "inpt") valid_flags <- c("output", "input") suggestions <- cmd_help_flags_similar(valid_flags, user_flags) if (FALSE) { # Throws error cmd_help_flags_suggest(suggestions) }