alder
alder copied to clipboard
Short option for -d reads directory by name of given number
Checked out this project just now, and after playing around with the options I had the following experience:
$ alder --depth 2
.
├── appearance
│ └── start
├── colors
│ └── start
├── editing
│ └── start
├── lang
│ └── start
└── project
└── start
10 directories, 0 files (0 B)
$ alder -d 2
node:internal/fs/utils:347
throw err;
^
Error: ENOENT: no such file or directory, scandir '/Users/agodin/.vim/pack/2'
at Object.readdirSync (node:fs:1451:3)
at buildTree (/Users/agodin/.nvm/versions/node/v18.14.2/lib/node_modules/@aweary/alder/alder.js:125:20)
at Object.<anonymous> (/Users/agodin/.nvm/versions/node/v18.14.2/lib/node_modules/@aweary/alder/alder.js:193:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '/Users/agodin/.vim/pack/2'
}
Node.js v18.14.2
It looks like the usage of -d is setting 2 as the argument for which directory to use as the cwd.