Searching your files

When Oda searches for a file, or for text inside files, the chat shows a search step you can open and read (Oda's steps in chat covers step rows in general). This page is about the results: what the card shows, what its counts mean, and what to do when a search finds too much, finds nothing or fails.

Read what a search found

Oda searches in two ways, and each has its own step:

For what each search accepts and how precise it can be, see Finding files and text.

While the search runs, the step shows one line only: the pattern Oda is searching for. There is nothing to open yet; the card appears when the search finishes. Expand the step to read the results:

The card's header counts what it holds: for a content search the matches and the files they sit in (3 matches · 2 files), for a file-name search the paths (2 paths). When the search found more than the card holds, the count says so, for example Showing 3 of 42 matches · 2 files. Copy in the header copies everything the card holds as plain text.

A very long result is previewed rather than printed in full: the card keeps the beginning and the end, and an expand control (… N more lines) reveals the rest. A search that matched nothing is not an error: its card reads No results.

A search step has no arguments section; expanding shows the results, not Oda's raw search parameters. If a recorded result does not carry the details the card needs, the step stays plain and shows the recorded text as it is.

When a search finds too much

Sometimes a search finds more than the card holds. The card then shows only a part of the results and tells you where the complete result is stored:

The line appears only when the search really was capped and the recorded result carries it; a search whose matches all fit on the card has no such line. If the complete result cannot be saved, the line says so instead and advises a narrower search: The complete result could not be saved; narrow pattern, path, or include to see more. A file-name search says narrow pattern or path there.

When a search fails

A failed search turns its step into the error state. The collapsed step shows the first line of the problem, for example grep: invalid regular expression when the pattern was not valid. Expand the step and the same text appears in the OUT section while the first line stays visible as the summary, so the text shows twice.

If the failure carries no text of its own, the step falls back to the error's name and code, for example ToolError: timeout.

Nothing was changed by a failed search. Ask again in your own words, for example naming the folder to look in or describing the text more precisely.

Questions, answered

Why does a search result say the full result is stored somewhere?

The search found more matches than the card holds, so the complete result was saved and the line below the card names it. Ask Oda to read that file, or to search inside it, to see every match.

What do the numbers in the search card mean?

The header counts what the card holds: the matches and the files they sit in for a content search (3 matches · 2 files), or the paths for a file-name search (2 paths). When the search found more, the count adds the full total: Showing 3 of 42 matches · 2 files.

Why do the words Grep and Glob appear in my chat?

They are the titles of Oda's two search steps: Grep is a content search, Glob is a file-name search. You do not need to use these words yourself; ask in your own words.

Oda searched and found nothing. Is something wrong?

No. The card reads No results: the search ran and matched nothing. Ask again with different words, or name the folder to look in.

A search failed. What should I do?

Nothing was changed by the failed search. The step shows the first line of the problem, for example grep: invalid regular expression when the pattern was not valid; ask again in your own words and Oda can search again.

Why is the same error text shown twice on a failed search?

The first error line is the step's summary, and expanding keeps the summary visible while repeating the text in the OUT section. It is one error, shown in both places.

Can I open a file straight from the search results?

No. The card shows and copies results; it does not open files. Ask Oda to open the file, or to read it: a read appears as its own step (Reading files and images), and Opening files from chat covers how opening works.

Can I copy the search results?

Yes. Copy in the card's header copies everything the card holds as plain text: for a content search every file with its matches and line numbers, for a file-name search the path list.

Does the stored result file stay on my computer?

It is a file on this computer, not a copy inside the chat. How Oda keeps and clears these result files is covered in Large results and spill files.