Created
August 9, 2020 02:44
-
-
Save jaredyam/7a51b9a8f337df880869f9957a6d2593 to your computer and use it in GitHub Desktop.
Auto-suggestion conda environment activation workflow using fzf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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