help creating an autocompleter? #932
|
I have a local database with an inventory of Kubernetes clusters. I can produce a list of cluster IDs with: My team uses a custom binary for authentication to these clusters, and I'd like to set up an autocompleter to fuzzy match cluster ID, something like: That should return But I haven't been able to piece together quite enough yet to get it working. From the above, I get: I expect I'm missing a few things here, but I'd appreciate any and all suggestions. TIA! 🙏🏽 |
Replies: 1 comment 5 replies
|
I've made a bit of progress. This will return the entire list of cluster IDs:
EDIT: |
tab completetion is prefix-only. But if you press
ctrl+fthen you do get a kind-of fuzzy match:https://murex.rocks/user-guide/terminal-keys.html#fuzzy-find-autocomplete
It's not "proper" fuzzy find because you wouldn't get misspellings et al matched. But it is still a hell of a lot more useful than prefix matching for times when you're not really sure what you're looking for
I'm not really certain what you're asking for here, but there are ways to pass values to stdin. eg