You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(scan): add [scan] dirs to set scan roots without implying home (#130)
* feat(scan): add [scan] dirs to scan roots without implying home
[scan] extra always adds to home, with no way to scan only a subset
of it. [scan] dirs is an exhaustive list instead: home is scanned
only if it's listed. Positional CLI overrides both; dirs wins over
extra if both are set, with a warning; all-missing dirs is an error
rather than a silent no-op scan.
Closes#129.
* test(scan): cover [scan] dirs narrowing a cache from a wider scan
The path cache outlives a config change, so a cache built from a full
home scan must be filtered on read rather than re-excluded wholesale
when the scan roots narrow.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -245,6 +245,16 @@ extra = /Volumes/Work/clients # ~ is expanded, e.g. extra = ~/Sites
245
245
246
246
Your home directory is always scanned; these are added to it. Configured directories that don't exist (an unmounted volume, say) are skipped with a warning instead of failing the run. Passing a directory on the command line (`asimov /some/path`) still overrides everything and scans only that path.
247
247
248
+
Only keep projects under a subset of home — say `~/Code` — and don't want the rest of home scanned at all? Use `dirs` instead of `extra`. It's an exhaustive list: home is scanned only if you list it.
249
+
250
+
```ini
251
+
[scan]
252
+
dirs = ~/Code # one "dirs =" line per directory; home is NOT implied
253
+
dirs = /Volumes/Work/clients # add as many roots as you need
254
+
```
255
+
256
+
`dirs` and `extra` answer different questions, so don't mix them — if both are set, `dirs` wins and `extra` is ignored with a warning. If every listed directory turns out to be missing, Asimov exits with an error rather than silently scanning nothing.
257
+
248
258
### Add your own patterns
249
259
250
260
Using a tool Asimov doesn't know about yet? Add it yourself. Each pattern is a `directory sentinel` pair — exactly the same mechanism the [built-ins](#how-it-works) use: the directory is excluded **only** when the sentinel file sits right beside it, so it's safe even for common folder names.
0 commit comments