mirror of https://github.com/ohmyzsh/ohmyzsh.git
Compare commits
7 Commits
7e85465957
...
b756c2033a
Author | SHA1 | Date |
---|---|---|
|
b756c2033a | |
|
d82669199b | |
|
9c8afcc3ee | |
|
ba7a5e68e6 | |
|
a6465f839f | |
|
2422635513 | |
|
e501f8aace |
|
@ -1,5 +1,5 @@
|
||||||
certifi==2024.12.14
|
certifi==2024.12.14
|
||||||
charset-normalizer==3.4.0
|
charset-normalizer==3.4.1
|
||||||
idna==3.10
|
idna==3.10
|
||||||
PyYAML==6.0.2
|
PyYAML==6.0.2
|
||||||
requests==2.32.3
|
requests==2.32.3
|
||||||
|
|
|
@ -13,6 +13,8 @@ function afmagic_dashes {
|
||||||
# the prompt, account for it when returning the number of dashes
|
# the prompt, account for it when returning the number of dashes
|
||||||
if [[ -n "$python_env" && "$PS1" = *\(${python_env}\)* ]]; then
|
if [[ -n "$python_env" && "$PS1" = *\(${python_env}\)* ]]; then
|
||||||
echo $(( COLUMNS - ${#python_env} - 3 ))
|
echo $(( COLUMNS - ${#python_env} - 3 ))
|
||||||
|
elif [[ -n "$VIRTUAL_ENV_PROMPT" && "$PS1" = *${VIRTUAL_ENV_PROMPT}* ]]; then
|
||||||
|
echo $(( COLUMNS - ${#VIRTUAL_ENV_PROMPT} ))
|
||||||
else
|
else
|
||||||
echo $COLUMNS
|
echo $COLUMNS
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -227,6 +227,18 @@ prompt_virtualenv() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Anaconda: current working conda env
|
||||||
|
# To replace the conda modification of PS1 do `conda config --set changeps1 False`
|
||||||
|
# or add 'changeps1: False' to your .condarc file.
|
||||||
|
prompt_conda() {
|
||||||
|
local conda_env="$CONDA_DEFAULT_ENV"
|
||||||
|
if [[ -n $conda_env ]]; then
|
||||||
|
if [[ -z $CONDA_PROMPT_MODIFIER ]]; then
|
||||||
|
prompt_segment blue black "conda:$(basename $conda_env)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Status:
|
# Status:
|
||||||
# - was there an error
|
# - was there an error
|
||||||
# - am I root
|
# - am I root
|
||||||
|
@ -258,6 +270,7 @@ prompt_aws() {
|
||||||
build_prompt() {
|
build_prompt() {
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
prompt_status
|
prompt_status
|
||||||
|
prompt_conda
|
||||||
prompt_virtualenv
|
prompt_virtualenv
|
||||||
prompt_aws
|
prompt_aws
|
||||||
prompt_context
|
prompt_context
|
||||||
|
|
Loading…
Reference in New Issue