Export

Export provides a json representation of an InvokedAction. It is used to exchange completions between commands with ActionImport as well as for Cache.

type Export struct {
	version  string   `json:"version"`
	messages []string `json:"messages"`
	nospace  string   `json:"nospace"`
	usage    string   `json:"usage"`
	values   []struct {
		value       string `json:"value"`
		display     string `json:"display"`
		description string `json:"description,omitempty"`
		style       string `json:"style,omitempty"`
		tag         string `json:"tag,omitempty"`
	} `json:"values"`
}
KeyDescription
versionversion of carapace being used
messageslist of error messages
nospacecharacter suffixes that prevent space suffix (* matches all)
usageusage message
valueslist of completion values
-
valuevalue to insert
displayvalue to display during completion
descriptiondescription of the value
stylestyle of the value
tagtag of the value

Example

example _carapace export example m<TAB>
{
  "version": "unknown",
  "messages": [],
  "nospace": "",
  "usage": "",
  "values": [
    {
      "value": "modifier",
      "display": "modifier",
      "description": "modifier example",
      "style": "yellow",
      "tag": "modifier commands"
    },
    {
      "value": "multiparts",
      "display": "multiparts",
      "description": "multiparts example",
      "tag": "other commands"
    }
  ]
}