Added venv support because the default is broken
This commit is contained in:
parent
108102ca2b
commit
8a9ed776b4
1 changed files with 13 additions and 1 deletions
14
zsh/zshrc
14
zsh/zshrc
|
@ -54,6 +54,18 @@ antigen apply
|
||||||
|
|
||||||
# custom functions for powerlevel9k
|
# custom functions for powerlevel9k
|
||||||
POWERLEVEL9K_ELIXIR_ICON=$'🥃'
|
POWERLEVEL9K_ELIXIR_ICON=$'🥃'
|
||||||
|
POWERLEVEL9K_PYTHON_ICON=$'\U1F40D'
|
||||||
|
|
||||||
|
prompt_custom_virtualenv() {
|
||||||
|
local virtualenv_path="$VIRTUAL_ENV"
|
||||||
|
if [[ -n "$virtualenv_path" && "$VIRTUAL_ENV_DISABLE_PROMPT" != true ]]; then
|
||||||
|
local python_version="$(python --version | cut -d ' ' -f 2)"
|
||||||
|
echo -n "$POWERLEVEL9K_PYTHON_ICON $(python --version) in $(basename $(dirname $virtualenv_path))"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
POWERLEVEL9K_CUSTOM_VIRTUALENV="prompt_custom_virtualenv"
|
||||||
|
|
||||||
|
|
||||||
prompt_asdf_elixir() {
|
prompt_asdf_elixir() {
|
||||||
if [ $commands[asdf] ]; then
|
if [ $commands[asdf] ]; then
|
||||||
ELIXIR_ICON=$'🥃'
|
ELIXIR_ICON=$'🥃'
|
||||||
|
@ -79,7 +91,7 @@ export POWERLEVEL9K_IGNORE_TERM_COLORS=true
|
||||||
export POWERLEVEL9K_PROMPT_ON_NEWLINE=true
|
export POWERLEVEL9K_PROMPT_ON_NEWLINE=true
|
||||||
export POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
|
export POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
|
||||||
export POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_writable vcs custom_asdf_elixir)
|
export POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_writable vcs custom_asdf_elixir)
|
||||||
export POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(virtualenv command_execution_time)
|
export POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(custom_virtualenv command_execution_time)
|
||||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue