This is a simple shell to help you quickly select conda environment.
When you want to change conda env, you may:
- To excute
conda env listto check out the env name you want to use and copy it. - To knock up
conda activateon the keyboard and paste the env name.
🎉 Now,you only need to knock xconda
The script only support
bashorzsh, don't supportsh
echo $SHELL
=>
/bin/bash
or
/bin/zsh
Due to the difference of array between
zshandbash, the script can't compatible with the two shell environment automatically. By default, the script is compatible withbash. if you usezsh, you can change the value of a variable, named array_len_delta, in the first few lines, to 1.
vim ~/.bashrcif you use bash shell orvim ~/.zshrcif you use zsh shell.- add the content of
xconda.shto the tail of your shell config file.
you can also excuteecho xcd.sh >> ~/.bashrcto simple the above operations
You can restart a shell window or excute:
source ~/.bashrc
or
source ~/.zshrc
