Merge pull request #7428 from ch33hau/prevent-trim-auth

auth command with leading spaces will be written to history
pull/7281/head
Jason Wilder 2016-10-18 15:12:01 -06:00 committed by GitHub
commit 1aafea2e07
1 changed files with 2 additions and 2 deletions

View File

@ -229,7 +229,7 @@ func (c *CommandLine) mainLoop() error {
c.exit() c.exit()
return e 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.Line.AppendHistory(l)
c.saveHistory() c.saveHistory()
} }
@ -744,7 +744,7 @@ func (c *CommandLine) formatResults(result client.Result, separator string) []st
} }
rows = append(rows, strings.Join(values, separator)) 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" { if c.Format == "column" {
rows = append(rows, "") rows = append(rows, "")
} }