Show search query results in terminal with CLI

What I’m trying to do

When I run search query="TODO" format=text CLI returns the name of the file containing “TODO” but it doesn’t display the text in the terminal. I want the results to be displayed.

Things I have tried

I have tried variations of the above command but these have not yielded positive results. I may, of course, be missing something obvious.

You could try this maybe (in the TUI) ? :woman_shrugging:

> search:context query=TODO case

In Obsidian’s Sandbox vault (in which I added 3 TODO at the end of some lines in some files), it returned something like:

Start here.md:1: Hi, welcome to Obsidian! TODO
Start here.md:22: This is a sandbox vault in which you can test various functionalities of Obsidian. TODO
Formatting/Blockquote.md:9: \- Doug Engelbart, 1961 TODO

It still returns more than I think you would like though :sweat_smile:

That does work, thank you. But you’re right, it returns way too much (esp. when a TODO is written in the line of an article [where a new line is actually a paragraph]). That said, your solution does help me take a step forward with this!

1 Like