Discover, install, and configure shell plugins with Fig Plugin Store →

Zsh Opt Path

Automatically add ~/opt/*/bin to $PATH

11 stars
0 forks


Automatically add paths in ~/opt/ to your $PATH.

This will search your ~/opt/ directory for subpaths, or subpaths containing a bin directory, and add these directories to your $PATH if they are not already listed.

For example, if you have multiple projects built in separate prefixes of ~/opt/, this will find them and add them to $PATH without needing to be explicitly listed in your .zshrc:

$ echo $PATH

zsh-opt-path is copyright 2015 John Reese and licensed under the MIT license.