Warp does not use venv prompt

Open
#1,855 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python, rust, zsh
Domain
cli

Research direction

Reproduce the issue with the provided Python venv commands and inspect test-env/pyvenv.cfg, especially the prompt entry. Trace how Warp detects and displays the active virtual environment, then verify that the displayed Python prompt uses "a test env" rather than "test-env" on macOS with zsh.

Written by the indexing model from the issue text.

Description

area:shell-terminal bug ready-to-implement triaged
Discord username (optional)

No response

Describe the bug

I have created a virtual environment that uses the --prompt option to give the venv a name.

$ python -m venv test-env --prompt "a test env"
$ source test-env/bin/activate
Screen Shot 2022-09-21 at 9 13 01 AM

Warp says the "name" of the venv is test-env. It should use the value from the --prompt flag, which can be found here:

$ cat test-env/pyvenv.cfg
home = /Users/samedwardes/.pyenv/versions/3.10.4/bin
include-system-site-packages = false
version = 3.10.4
prompt = 'a test env'

For example in Kitty with the starship prompt, it looks like this.

Screen Shot 2022-09-21 at 9 17 58 AM
To Reproduce

See bug description.

Expected behaviour

The python prompt should read "a test env".

Screenshots

No response

Operating System

MacOS

OS Version

12.6

Shell Version

zsh 5.8.1 (x86_64-apple-darwin21.0)

Warp Version

v0.2022.09.13.08.15.stable_03

Additional context

No response

Does this block you from using Warp daily?

No

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

No response

Dominant language
Rust
Stars
65.1k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from warpdotdev/warp

All issues in warpdotdev/warp

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.