down-the-rabbit-hole

Find and follow symlinks off $PATH


Keywords
symlinks
License
ISC
Install
npm install down-the-rabbit-hole@1.1.1

Documentation

Rabbit-hole

Find any executable on $PATH and view its symlink chain

Version CircleCI Appveyor CI Codecov Greenkeeper Known Vulnerabilities Downloads/week License

Installation

npm install -g path-rabbit-hole

Usage

Executables higher-up in the tree take precedence on $PATH.

Show the $PATH tree

$ rh
├─ /usr/local/bin
├─ /usr/bin
├─ /bin
├─ /usr/sbin
└─ /sbin

Find an executable on $PATH

$ rh brew
├─ /usr/local/bin
│  └─ brew
│     └─ /usr/local/Homebrew/bin/brew
├─ /usr/bin
├─ /bin
├─ /usr/sbin
└─ /sbin

Provide a path to search through

$ rh jest --path='./node_modules/.bin'
└─ /path/to/node_modules/.bin
   └─ jest
      └─ /path/to/node_modules/jest-cli/bin/jest.js

Find all executables & symlinks on $PATH

$ rh --find-all # or -a

Find all executables but hide symlinks

$ rh -a --hide-symlinks # or -h