mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
added conda to bira enviroment
This commit is contained in:
parent
608d62b2a5
commit
3d6c513aa3
2 changed files with 12 additions and 1 deletions
|
|
@ -42,3 +42,12 @@ ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
|
|||
function ruby_prompt_info() {
|
||||
echo "$(rvm_prompt_info || rbenv_prompt_info || chruby_prompt_info)"
|
||||
}
|
||||
|
||||
# use this to enable users to see their conda env info
|
||||
conda_prompt_info() {
|
||||
if [ -n "$CONDA_DEFAULT_ENV" ]; then
|
||||
echo -n "%{$terminfo[bold]$fg[yellow]%}($CONDA_DEFAULT_ENV) %{$reset_color%}"
|
||||
else
|
||||
echo -n ''
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
|||
local user_host="%B%(!.%{$fg[red]%}.%{$fg[green]%})%n@%m%{$reset_color%} "
|
||||
local user_symbol='%(!.#.$)'
|
||||
local current_dir="%B%{$fg[blue]%}%~ %{$reset_color%}"
|
||||
local conda_prompt='$(conda_prompt_info)'
|
||||
|
||||
local vcs_branch='$(git_prompt_info)$(hg_prompt_info)'
|
||||
local rvm_ruby='$(ruby_prompt_info)'
|
||||
|
|
@ -14,7 +15,8 @@ fi
|
|||
|
||||
ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
|
||||
|
||||
PROMPT="╭─${user_host}${current_dir}${rvm_ruby}${vcs_branch}${venv_prompt}${kube_prompt}
|
||||
#PROMPT="╭─${user_host}${current_dir}${rvm_ruby}${vcs_branch}${venv_prompt}${kube_prompt}
|
||||
PROMPT="╭─${conda_prompt}${user_host}${current_dir}${rvm_ruby}${vcs_branch}${venv_prompt}${kube_prompt}
|
||||
╰─%B${user_symbol}%b "
|
||||
RPROMPT="%B${return_code}%b"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue