Sfoglia il codice sorgente

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

Fixes #524

Co-authored-by: Alexey Alexandrov <aalexand@users.noreply.github.com>
Michael Pratt 5 anni fa
parent
commit
dfef78b547
No account linked to committer's email address
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1
    1
      internal/driver/commands.go
  2. 1
    1
      internal/driver/interactive.go

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

@@ -272,7 +272,7 @@ func usage(commandLine bool) string {
272 272
 	} else {
273 273
 		help = "  Commands:\n"
274 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 278
 	help = help + strings.Join(commands, "\n") + "\n\n" +

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

@@ -110,7 +110,7 @@ func interactive(p *profile.Profile, o *plugin.Options) error {
110 110
 			case "o", "options":
111 111
 				printCurrentOptions(p, o.UI)
112 112
 				continue
113
-			case "exit", "quit":
113
+			case "exit", "quit", "q":
114 114
 				return nil
115 115
 			case "help":
116 116
 				commandHelp(strings.Join(tokens[1:], " "), o.UI)