Skip to content

Plugin provides condaenv_prompt_info which can be used in a theme

License

Notifications You must be signed in to change notification settings

saravanabalagi/zsh-plugin-condaenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

zsh-condaenv

Plugin provides condaenv_prompt_info function which returns the current conda environment name.

Screenshot

Installation

  1. Download the plugin

    git clone https://github.com/saravanabalagi/zsh-plugin-condaenv $ZSH_CUSTOM/plugins/condaenv
    
  2. Add to plugins in .zshrc file

    plugins=(
    	...
    	condaenv
    )
    

Then launch a new terminal or source .zshrc in your current terminal.

Usage

This plugin exposes:

  • condaenv_prompt_info function based on two env vars
    1. ZSH_THEME_CONDAENV_PREFIX default (
    2. ZSH_THEME_CONDAENV_SUFFIX default )

Using this you can build a theme as below:

base_prompt=PROMPT
PROMPT=$(condaenv_prompt_info)"$base_prompt"

ZSH_THEME_CONDAENV_PREFIX="%{$fg[blue]%}("
ZSH_THEME_CONDAENV_SUFFIX=")%{$reset_color%}"

License

Please refer to the License file.

About

Plugin provides condaenv_prompt_info which can be used in a theme

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages