Files
dotfiles/local/bin/x-visit-folders.md
Ismo Vuorinen fae7a8f13f 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
2026-03-01 22:02:49 +02:00

24 lines
513 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 : -->