Would be nice to see CompletionMatches' .ToolTips in the fzf --preview-window.
Here's how I think this could work:
- get array of completions
- Generate JSON object: keys == CompletionText, values == ToolTip
- Write JSON to a temp file
- pass a command to
fzf --preview that can lookup a value from a key in the JSON
- If using
jq, could be: fzf --preview 'jq --raw-output --arg key "{1}" ".[$key]" /path/to/tempfile.json'
- relying on an external binary is not ideal
fzf might get support for reading directly from JSON, no need for external jq binary
Would be nice to see CompletionMatches'
.ToolTips in the fzf--preview-window.Here's how I think this could work:
fzf --previewthat can lookup a value from a key in the JSONjq, could be:fzf --preview 'jq --raw-output --arg key "{1}" ".[$key]" /path/to/tempfile.json'fzfmight get support for reading directly from JSON, no need for externaljqbinary