Style completion options with rust-native completions
Two halves to this
Some completion options have a "pretty" mode, a display-only completion result
Next step is coloring of that, see
- https://carapace.sh/
- https://carapace-sh.github.io/carapace/carapace/action/style.html
This could likely be a pretty: Option<StyledStr> and wouldn't require a breaking change.
It looks like powershell has native support for a "pretty" or "display" value called listItemText
https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.completionresult.-ctor?view=powershellsdk-7.4.0#system-management-automation-completionresult-ctor(system-string-system-string-system-management-automation-completionresulttype-system-string)
Carapace
For bash, it includes the display item in the description https://github.com/carapace-sh/carapace/blob/68d3237f5321f743ec0428e450957b797f3889b3/internal/shell/bash/action.go#L100-L106
For zsh, it does display:description. Unsure if that is special zsh syntax
https://github.com/carapace-sh/carapace/blob/68d3237f5321f743ec0428e450957b797f3889b3/internal/shell/zsh/action.go#L70-L74
For elvish, its communicating via json