~sjm/can-docs

3de5fd31d52c142b1774bc955b7b02f2bcfac574 — Sam Marshall 1 year, 11 months ago dce90af master
add docs for can search
2 files changed, 22 insertions(+), 0 deletions(-)

M docs/can-commands.md
A docs/can-search.md
M docs/can-commands.md => docs/can-commands.md +1 -0
@@ 10,6 10,7 @@ The commands shown here are all commands, including internal commands. Those clo
|---------------------------------------|-------------------------------------------------------------|
| [can-status](./can-status.md)         | report the current state of the writing folder              |
| [can-add](./can-add.md)               | add notes from the writing folder into the notebook         |
| [can-search](./can-search.md)         | search for notes in your notebook                           |
| [can-new](./can-new.md)               | create a new writing-folder containing a notebook           |
| [can-ast-at](./can-ast-at.md)         | given an address, find the AST of a note                    |
| [can-md](./can-md.md)                 | convert from markdown to can's internal AST format          |

A docs/can-search.md => docs/can-search.md +21 -0
@@ 0,0 1,21 @@
# can-search

The `can-search` command allows you to search through the notes inside your notebook, with the option to pull any matches out into your [writing-folder](./writing-folder.md). 

```
can-search "<query>"
```

`<query>` here will perform a fuzzy search against the text of notes in the notebook,  printing any results to the console with the name of the note included.

```
can-search "<query>" --fetch
```

This command will pull any matching notes into the writing-folder.

```
can-search "<query>" --fetch --recursive
```

This command will pull any matching notes into the writing-folder, along with any notes that they refer to, and so on.