mirror of
https://github.com/turbot/steampipe.git
synced 2026-02-18 13:00:10 -05:00
- Execute RefreshConnections asyncronously - Add connection_state table to indicate the loading state of connections - Optimise RefreshConnections by cloning connection schemas - Add locking to ensure only a single instance of RefreshConnections runs - Start executing queries without waiting for connections to load, add smart error handling to wait for required connection - Optimise autocomplete for high connection count - Autocomplete and inspect data available before all conections are refreshed - Update file watcher to respond to CHMOD, so thaat it pickes up deletion of file contents Closes #3394 Closes #3267
22 lines
561 B
Go
22 lines
561 B
Go
package metaquery
|
|
|
|
import (
|
|
"sort"
|
|
|
|
"github.com/c-bata/go-prompt"
|
|
)
|
|
|
|
// PromptSuggestions returns a list of the metaquery suggestions for go-prompt
|
|
func PromptSuggestions() []prompt.Suggest {
|
|
suggestions := make([]prompt.Suggest, 0, len(metaQueryDefinitions))
|
|
for k, definition := range metaQueryDefinitions {
|
|
suggestions = append(suggestions, prompt.Suggest{Text: k, Description: definition.description, Output: k})
|
|
}
|
|
|
|
sort.SliceStable(suggestions[:], func(i, j int) bool {
|
|
return suggestions[i].Text < suggestions[j].Text
|
|
})
|
|
|
|
return suggestions
|
|
}
|