diff --git a/client/main.go b/client/main.go index 0198715..b3c63cb 100644 --- a/client/main.go +++ b/client/main.go @@ -77,6 +77,9 @@ func readAllData(conn net.Conn) (string, error) { func completer(d prompt.Document) []prompt.Suggest { input := d.TextBeforeCursor() firstWord := strings.Split(input, " ")[0] + if firstWord == "" { + return []prompt.Suggest{} + } s := []prompt.Suggest{ {Text: "DBSIZE", Description: "Get number of keys in the db"}, {Text: "DEL", Description: "DEL key - Delete a key"},