Skip to content
This repository was archived by the owner on Apr 24, 2020. It is now read-only.
This repository was archived by the owner on Apr 24, 2020. It is now read-only.

how to reference another virtualenv plugin? #1392

@okakaino

Description

@okakaino

Hi, thanks for the hard work first.

I wanted to show virtualenv on my prompt, and I just found that as long as "virtualenv" is included here:

POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(virtualenv context dir vcs)

virtualenv always displays, no matter whether I enable oh-my-zsh virtualenv plugin or not

plugins=(git pip python)

After long time of research and grep-ing, I found that virtualenv segment is determined in powerlevel9k.zsh-theme file:

prompt_virtualenv() {
local virtualenv_path="$VIRTUAL_ENV"

[[ -z "$virtualenv_path" ]] && return

"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" "${virtualenv_path:t}" 'PYTHON_ICON'
}

so how virtualenv displays is pretty fixed here, it is not asking any other plugin for the appearance. But my system is configured a little differently, so the default value is not accurate, and I'm not able to use my own plugin to determine how I want to display my virtual environment name, is this on purpose? How can I display the way I want, please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions