A plugin for Oh My Zsh to seamlessly switch between your projects using fzf.
Requirements: Zsh, oh-my-zsh, fzf
- Ensure all requirements are installed.
- Download and install with git into the
$ZSH_CUSTOM
directory
git clone https://github.com/prmaloney/workon $ZSH_CUSTOM/plugins/workon
- Add the plugin to your list of plugins for Oh My Zsh in your
.zshrc
plugins=(
# other plugins...
workon
)
- Ensure your
$EDITOR
environment variable is set to the editor of your choice (in your.zshrc
)export EDITOR='nvim' # or your editor of choice
- Ensure that the
$WORK_DIR
environment variable is set to the directory containing your projects (also in.zshrc
)export WORK_DIR=$HOME/path/to/your/projects
- Restart your shell
Simply run workon
to run fzf
over the list of your projects. Once selected,
workon
will open this project in your editor.
Alternatively, you can run workon
with a search argument. If fzf
only finds
one match, the matching option will be opened in your editor.