Skip to content

Commit

Permalink
bug fix dropdown always open
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelightning committed Sep 27, 2024
1 parent 0b472ac commit e4ad61a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down

0 comments on commit e4ad61a

Please sign in to comment.