Skip to content

Instantly share code, notes, and snippets.

@jaredyam
Created August 9, 2020 02:44
Show Gist options
  • Select an option

  • Save jaredyam/7a51b9a8f337df880869f9957a6d2593 to your computer and use it in GitHub Desktop.

Select an option

Save jaredyam/7a51b9a8f337df880869f9957a6d2593 to your computer and use it in GitHub Desktop.
Auto-suggestion conda environment activation workflow using fzf.
# Implement Auto-suggestion/auto-complete conda environment activation workflow combining conda env manager and fzf fuzzy find method.
#
# Note
# ----
# The command *conda init base* can help you initialize your terminal with the base env,
# in which setting your default Python interpreter is always the base one.
#
# Usage
# -----
# 1. include this function in your ~/.bashrc or ~/.zshrc;
# 2. source the dotfile;
# 3. in your terminal: $ condaf↩️;
function condaf() {
conda activate $(conda info --env | fzf | awk '{print $NF}')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment