-
Notifications
You must be signed in to change notification settings - Fork 45
Description
I have long names for the machines with or without character dividers '-', '/'
I'd like to be able to fuzzy find the machines names. The search is too strict when searching something.
Two approaches could work.
The first one could be to implement a search feature like in tssh (https://github.com/trzsz/trzsz-ssh) :
For example, with a name of machine like "exemple_machine_name_xxxxx" or "production/exemple_machine_name_xxxxx" :
all the following searches should work :
exemple xxxxx
exem xxx
exem me_xxx
prod exem xxx
on/ex ame_xxx
xx exemple
prod xxx exem
All the searches work because it searches contiguous strings and apply an "and" between the strings. The order of the strings doesn't matter. It's just "and" logic. This is how it works with tssh.
The second option is doing true fuzzy finding like fzf (https://github.com/junegunn/fzf) :
All the above still applies but we can release one constraint being contiguity. There is no sense of wording but just of ordering between characters. The following searches would work in true fuzzy finding :
exemplema xxxxx
exema chinxxx
inexxx exemplema
exema chinxxx
prodexena
The second option is the most complete
I guess it could even complement the feature request (#22) which somehow creates a tree structure with host groups where fuzzy finding could allow to find through the tree very quickly like fzf does with filesystems/paths.