Skip to content

Commit c1185a5

Browse files
committed
cli: in case of no possible arg values, return empty string
Signed-off-by: Rohit Yadav <rohit@apache.org>
1 parent 3e9af96 commit c1185a5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cli/completer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ func (t *autoCompleter) Do(line []rune, pos int) (options [][]rune, offset int)
352352
}
353353
}
354354
offset = 0
355+
if len(filteredOptions) == 0 {
356+
options = [][]rune{[]rune("")}
357+
}
355358
for _, item := range filteredOptions {
356359
option := item.Value + " "
357360
if len(filteredOptions) > 1 && len(item.Detail) > 0 {

0 commit comments

Comments
 (0)