This is my custom pluggin for additional utilities for working with conda in Zsh via Oh My Zsh.
Conda is the open source package management and environment management command line utility that manages the Python distributions offered by Continuum Analytics.
Auto-completion for:
- conda commands and subcommands
- current environment names
- package names to install/remove from an environment
- environment names when using
source activate
or any alias of it
In addition upon entering a directory with an environment.yml
file, conda will activate the environment if it exists, and ask if you wish to install and activate it if it does not.
Aliases Provided:
workon
forsource activate
workoff
forsource deactivate
Currently lookup of the package names requires parsing and iterating over a JSON object, which is done using Python. However as conda itself is written in Python, if you have installed conda you will also have Python.
The easiest way to install conda is to install the Miniconda Python distribution provided by Continuum Analytics.
- Install Miniconda
git clone https://github.com/MrKriss/conda-zsh-completion
- Copy subdirectory to ohmyzsh plugins directroy with
cp -R conda-zsh-completion/conda $ZSH/custom/plugins
- Enable
conda
by adding it to theplugins
variable defined in~/.zshrc
- Restart terminal
This plugin is largely a recombination of existing code written by the following authors: