feat(bin): add x-visit-folders script for bulk zoxide registration (#294)

* feat(bin): add x-visit-folders script for bulk zoxide registration

* fix(bin): fix x-visit-folders usage exit code, no-op fallback, and count increment

- usage() now accepts optional exit code; --help exits 0
- Remove no-op subshell cd fallback in visit_dir(), just log failure
- Replace ((count++)) with count=$((count + 1)) to avoid set -e trap
This commit is contained in:
2026-03-01 22:02:49 +02:00
committed by GitHub
parent eaa7680671
commit fae7a8f13f
2 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# x-visit-folders
Register level-1 subdirectories with zoxide so they appear in
`z` completions.
## Usage
```bash
x-visit-folders [options] [directory]
```
- `directory` target directory (defaults to current directory)
- `-n`, `--dry-run` list directories without adding them
- `-v`, `--verbose` print each directory as it is visited
- `-h`, `--help` show usage information
## Example
```bash
x-visit-folders ~/Code/ivuorinen
```
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->