Browse Source

cli: add 'q' as an alias for 'quit' (#525)

Fixes #524

Co-authored-by: Alexey Alexandrov <aalexand@users.noreply.github.com>
Michael Pratt 5 years ago
parent
commit
dfef78b547
No account linked to committer's email address
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      internal/driver/commands.go
  2. 1
    1
      internal/driver/interactive.go

+ 1
- 1
internal/driver/commands.go View File

272
 	} else {
272
 	} else {
273
 		help = "  Commands:\n"
273
 		help = "  Commands:\n"
274
 		commands = append(commands, fmtHelp("o/options", "List options and their current values"))
274
 		commands = append(commands, fmtHelp("o/options", "List options and their current values"))
275
-		commands = append(commands, fmtHelp("quit/exit/^D", "Exit pprof"))
275
+		commands = append(commands, fmtHelp("q/quit/exit/^D", "Exit pprof"))
276
 	}
276
 	}
277
 
277
 
278
 	help = help + strings.Join(commands, "\n") + "\n\n" +
278
 	help = help + strings.Join(commands, "\n") + "\n\n" +

+ 1
- 1
internal/driver/interactive.go View File

110
 			case "o", "options":
110
 			case "o", "options":
111
 				printCurrentOptions(p, o.UI)
111
 				printCurrentOptions(p, o.UI)
112
 				continue
112
 				continue
113
-			case "exit", "quit":
113
+			case "exit", "quit", "q":
114
 				return nil
114
 				return nil
115
 			case "help":
115
 			case "help":
116
 				commandHelp(strings.Join(tokens[1:], " "), o.UI)
116
 				commandHelp(strings.Join(tokens[1:], " "), o.UI)