glow
glow copied to clipboard
Search markdown from the cli
Would it be possible to add a search command, to make it easier to find a string in a file? I'm using glow with several git repos of markdown content (my personal knowledge), so a search would be really helpful.
Here's how I see it working -
glow search <some search string> [optional path to recursively search]
And glow would display a browsable list (like the existing menu), i.e.
Glow
211 Local
Home.md
Extract of text from from the markdown file with **search string highlighted** for easy reading
Home/3rd-Party-Systems.md
Extract of text from from the markdown file with **search string highlighted** for easy reading
Home/3rd-Party-Systems/Auth0.md
Extract of text from from the markdown file with **search string highlighted** for easy reading
│ Home/3rd-Party-Systems/Auth0/Auth0-Logs.md
Extract of text from from the markdown file with **search string highlighted** for easy reading
Selecting a file would allow the standard operations, returning back would return to the search results.
Also, it would great whilst in glow, to use the hotkey "?" to open a search dialog and search the open folder recursively. (Or alternatively use "s" for search, and "t" for stash).
Thanks!
Related: https://github.com/charmbracelet/glow/issues/183