Skip to content

Commit 57d76d8

Browse files
author
Henrique Sato
committed
address review
1 parent 307d778 commit 57d76d8

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

cli/completer.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ func (t *autoCompleter) Do(line []rune, pos int) (options [][]rune, offset int)
412412

413413
filteredOptions := []argOption{}
414414
if len(argOptions) > 0 {
415-
if isNumeric(argOptions[0].Value) {
415+
if autocompleteAPI.Name == "listUsageTypes" {
416416
sort.Slice(argOptions, func(i, j int) bool {
417417
i, _ = strconv.Atoi(argOptions[i].Value)
418418
j, _ = strconv.Atoi(argOptions[j].Value)
@@ -449,12 +449,3 @@ func (t *autoCompleter) Do(line []rune, pos int) (options [][]rune, offset int)
449449

450450
return options, offset
451451
}
452-
453-
func isNumeric(str string) bool {
454-
for _, char := range str {
455-
if !unicode.IsDigit(char) {
456-
return false
457-
}
458-
}
459-
return true
460-
}

0 commit comments

Comments
 (0)