mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-05 03:00:46 +00:00
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:
23
local/bin/x-visit-folders.md
Normal file
23
local/bin/x-visit-folders.md
Normal 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 : -->
|
||||
Reference in New Issue
Block a user