Open stephencweiss opened 4 years ago
https://github.com/adelsz/inquirer-fuzzy-path looks like inquirer
has a plugin that would work well for this.
even better, i could us it for the api like nom publish
and then, instead of failing, it would ask which file you want to publish and using fuzzy search we could look it up. https://github.com/mokkabonna/inquirer-autocomplete-prompt autocomplete
is another good option for how to combine the two.
https://github.com/Alek-S/select-run this might also be helpful in thinking about how to select/search for a note.
MVP is going to be a file fuzzy search based on the file path (i.e. slug)
The search command should is really quite different from the fuzzy search that's part of the update
command.
search
would look through the body/frontmatter to see if anything matches. it's a grep.
A search command could be leveraged to search the notes based on:
the return would be a list of files that match the criteria for the first iteration later implementations could highlight the line/part of the match (similar to how
grep
works)