Skip to content

Prompt virtualenv name does not respect Python's venv --prompt argument #539

@paw-lu

Description

@paw-lu

General information

System report (output of prompt_pure_system_report):

  • Zsh: zsh 5.3 (x86_64-apple-darwin18.0)
  • Operating system: Mac OS X 10.14.4 (18E226)
  • Terminal program: Hyper (3.0.2)
  • Git: git version 2.25.0
  • Pure state:
    • username: ''
    • prompt:
    • version: 1.10.3
  • Virtualenv: export VIRTUAL_ENV_DISABLE_PROMPT=12
  • Prompt: typeset -g PROMPT=$'%F{${prompt_pure_colors[path]}}%~%f %F{248}${prompt_pure_vcs_info[branch]}%F{13}${prompt_pure_git_dirty}%f %{ %}%(12V.%F{$prompt_pure_colors[virtualenv]}%12v%f .)%(?.%F{$prompt_pure_colors[prompt:success]}.%F{$prompt_pure_colors[prompt:error]})${prompt_pure_state[prompt]}%f '
  • Detected frameworks: Oh My Zsh
    • Oh My Zsh:
      • Plugins: git, osx, python, pip, conda-zsh-completion, poetry, docker, docker-compose, zsh-autosuggestions

Other information

I have:

  • Tested with another terminal program and can reproduce the issue:
  • Followed the integration instructions for my framework

Problem description

Python's venv has an optional argument where you may specify a prompt prefix via --prompt. I expect this name to be reflected in the prompt. When activating the pure theme, it does not respect the --prompt name and instead uses the directory name.

Reproduction steps

With pure theme

❯ python -m venv --prompt test .venv

❯ source .venv/bin/activate

.venv ❯

Without pure theme

% source .venv/bin/activate
(test) % 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions