Closed Drugoy closed 1 year ago
Hi and thanks for a clear report. I happen to be working on this already and just pushed it, with the difference in that and external command should produce output in the form “completion\tdescription”. The reason is fish already uses that kind of syntax, so we reuse that for zsh too. For bash, that means filtering out the descriptions (anything that comes after a tab character will be ignored)
Awesome, thank you! I merely suggest to mention this detail (and better also illustrate it with an example) in the README.
AFAIU complgen currently doesn't support descriptions (aka completion hints) with External commands: it looks like external commands are currently meant to be used only for getting a list of possible values and those values will be suggested to the user as autocompletion variants.
But in some cases it would be nice to have descriptions for those variants. Here's a minimal synthetic illustration of the feature request:
I would like this .usage rule to produce an autocompletion that would suggest
bool
/str
/int
with a description next to them. Instead, currently it producesbool\ \"a\ boolean\ \(true/false\)\"
/int\ \"an\ integer\"
/str\ \"a\ string\"
as values (so the supposed description is currently treated as a part of the value).