Skip to content

Commit 7791866

Browse files
authored
Auto complete listServiceOfferings with service offerings when isSystem=true (#186)
1 parent 648a07c commit 7791866

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/completer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,10 @@ func (t *autoCompleter) Do(line []rune, pos int) (options [][]rune, offset int)
421421
autocompleteAPI.Name = "listSystemVms"
422422
} else if apiFound.Name == "associateIpAddress" {
423423
autocompleteAPIArgs = append(autocompleteAPIArgs, "state=Free")
424+
} else if apiFound.Name == "listServiceOfferings" {
425+
if arg.Name == "id=" && strings.Contains(strings.Join(splitLine, " "), "issystem=true") {
426+
autocompleteAPIArgs = append(autocompleteAPIArgs, "issystem=true")
427+
}
424428
}
425429

426430
spinner := t.Config.StartSpinner("fetching options, please wait...")

0 commit comments

Comments
 (0)