Bash tab completion of environment names when using conda activate
#!/bin/bash | |
# 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