From 8faee6b4463db9fb3be1ee3c90301117e500f355 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 29 Oct 2024 15:42:00 +0100 Subject: [PATCH] app/vlogscli: print hint on how to see available commands when starting vlogscli This should improve the first-time experience with vlogscli --- app/vlogscli/main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/vlogscli/main.go b/app/vlogscli/main.go index 36acb1720..8799ab199 100644 --- a/app/vlogscli/main.go +++ b/app/vlogscli/main.go @@ -69,8 +69,8 @@ func main() { fatalf("cannot initialize readline: %s", err) } - fmt.Fprintf(rl, "sending queries to %s\n", *datasourceURL) - + fmt.Fprintf(rl, "sending queries to -datasource.url=%s\n", *datasourceURL) + fmt.Fprintf(rl, `type ? and press enter to see available commands`+"\n") runReadlineLoop(rl, &incompleteLine) if err := rl.Close(); err != nil { @@ -252,7 +252,7 @@ func isHelpCommand(s string) bool { } func printCommandsHelp(w io.Writer) { - fmt.Fprintf(w, "%s", `List of available commands: + fmt.Fprintf(w, "%s", `Available commands: \q - quit \h - show this help \s - singleline json output mode @@ -260,6 +260,8 @@ func printCommandsHelp(w io.Writer) { \c - compact output \logfmt - logfmt output mode \tail - live tail results + +See https://docs.victoriametrics.com/victorialogs/querying/vlogscli/ for more details `) }