Skip to content

Instantly share code, notes, and snippets.

@lebedov lebedov/.bashrc
Created May 2, 2019

What would you like to do?
Bash tab completion of environment names when using conda activate
# Add the following lines to .bashrc to enable tab completion of available conda
# environment names when using conda activate. Assumes conda and jq are in one's PATH:
export CONDA_ENV_LIST=`conda env list --json | jq -r '[ .envs[1:][] | split("/")[-1] ] | join(" ")'`
complete -W "$CONDA_ENV_LIST" conda activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.