mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-10 04:26:17 +02:00
feat(conda): add environment tab completion for cna and cnrn
- Add conda command check to exit early if conda is not installed - Convert `cna` and `cnrn` from aliases to functions to support arguments - Add `_omz_conda_envs` completion function that fetches conda environments and provides tab completion for `cna` and `cnrn` commands AI-assisted contribution disclosure Plugin script (conda.plugin.zsh): Generated with GPT 5.4 (thinking mode), then reviewed and tested manually README, commit messages, and PR: Written with Claude Code (claude-opus-4-6) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8df5c1b18b
commit
25488fe69d
2 changed files with 28 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# conda plugin
|
||||
|
||||
The conda plugin provides [aliases](#aliases) for `conda`, usually installed via [anaconda](https://www.anaconda.com/) or [miniconda](https://docs.conda.io/en/latest/miniconda.html).
|
||||
The conda plugin provides [aliases](#aliases) and [completion](#completion) for `conda`, usually installed via [anaconda](https://www.anaconda.com/) or [miniconda](https://docs.conda.io/en/latest/miniconda.html).
|
||||
|
||||
To use it, add `conda` to the plugins array in your zshrc file:
|
||||
|
||||
|
|
@ -35,3 +35,10 @@ plugins=(... conda)
|
|||
| `cnu` | `conda update` | Update conda package manager |
|
||||
| `cnua` | `conda update --all` | Update all installed packages |
|
||||
| `cnuc` | `conda update conda` | Update conda package manager |
|
||||
|
||||
## Completion
|
||||
|
||||
Tab completion is available for the following commands by fetching the list of conda environments:
|
||||
|
||||
- `cna`: completes environment names for `conda activate`
|
||||
- `cnrn`: completes environment names for `conda remove -y --all -n`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue