Merge pull request #553 from github/unquote-interactive-command

support quoted values in interactive commands
This commit is contained in:
Shlomi Noach 2018-02-27 06:23:18 +02:00 committed by GitHub
commit d6f4ed7ac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,6 +130,9 @@ func (this *Server) applyServerCommand(command string, writer *bufio.Writer) (pr
arg := ""
if len(tokens) > 1 {
arg = strings.TrimSpace(tokens[1])
if unquoted, err := strconv.Unquote(arg); err == nil {
arg = unquoted
}
}
argIsQuestion := (arg == "?")
throttleHint := "# Note: you may only throttle for as long as your binary logs are not purged\n"