Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
b721053c
Commit
b721053c
authored
May 21, 2020
by
Marc Cornellà
Browse files
af-magic: account for active conda envs in dash line
See
https://github.com/ohmyzsh/ohmyzsh/issues/8081#issuecomment-632182715
parent
25d0b2df
Changes
1
Hide whitespace changes
Inline
Side-by-side
themes/af-magic.zsh-theme
View file @
b721053c
...
...
@@ -10,9 +10,14 @@ typeset +H my_orange="$FG[214]"
# separator dashes size
function afmagic_dashes {
[[ -n "${VIRTUAL_ENV-}" && -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" && "$PS1" = \(* ]] \
&& echo $(( COLUMNS - ${#VIRTUAL_ENV} - 3 )) \
|| echo $COLUMNS
local PYTHON_ENV="$VIRTUAL_ENV"
[[ -z "$PYTHON_ENV" ]] && PYTHON_ENV="$CONDA_DEFAULT_ENV"
if [[ -n "$PYTHON_ENV" && "$PS1" = \(* ]]; then
echo $(( COLUMNS - ${#PYTHON_ENV} - 3 ))
else
echo $COLUMNS
fi
}
# primary prompt
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment