From 933fd8e8fe68d5cd368ac4af1ba3cf6b783d8fbd Mon Sep 17 00:00:00 2001 From: ch33hau Date: Sat, 8 Oct 2016 02:45:22 +0800 Subject: [PATCH 1/2] Prevent auth command with leading spaces writing to history --- cmd/influx/cli/cli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/influx/cli/cli.go b/cmd/influx/cli/cli.go index 47f4e2f580..edd904ac0b 100644 --- a/cmd/influx/cli/cli.go +++ b/cmd/influx/cli/cli.go @@ -200,7 +200,7 @@ func (c *CommandLine) mainLoop() error { c.exit() return e } - if err := c.ParseCommand(l); err != ErrBlankCommand && !strings.HasPrefix(l, "auth") { + if err := c.ParseCommand(l); err != ErrBlankCommand && !strings.HasPrefix(strings.TrimSpace(l), "auth") { c.Line.AppendHistory(l) c.saveHistory() } From b4e98e992d27fa78eadc023ed22305c8e7aed1d9 Mon Sep 17 00:00:00 2001 From: ch33hau Date: Sat, 8 Oct 2016 02:48:27 +0800 Subject: [PATCH 2/2] Fix tiny typo --- cmd/influx/cli/cli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/influx/cli/cli.go b/cmd/influx/cli/cli.go index edd904ac0b..f78879a371 100644 --- a/cmd/influx/cli/cli.go +++ b/cmd/influx/cli/cli.go @@ -715,7 +715,7 @@ func (c *CommandLine) formatResults(result client.Result, separator string) []st } rows = append(rows, strings.Join(values, separator)) } - // Outout a line separator if in column format + // Output a line separator if in column format if c.Format == "column" { rows = append(rows, "") }