Wrong Environment Name with Feature "Honor user's custom prompt (PS1) setting."

Open
#1,452 8 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start in Settings -> Features by reproducing the issue with “Honor user's custom prompt (PS1) setting.” enabled, then run conda activate ENV_NAME and compare the prompt with conda info. Trace how the active environment name is obtained and rendered when the custom PS1 setting is enabled. Done means the prompt shows ENV_NAME while the active environment is ENV_NAME.

Written by the indexing model from the issue text.

Description

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

No response

Describe the bug
With the feature "Honor user's custom prompt (PS1) setting." activated, the anaconda environment name in the prompt keeps showing "base" after "conda activate ENV_NAME", even though the active environment has actually been switched to the "ENV_NAME".

With the feature "Honor user's custom prompt (PS1) setting." deactivated, the anaconda environment name is correct in the prompt.
To Reproduce

Steps to reproduce:

  1. Go to 'Settings -> Features'
  2. Activate 'Honor user's custom prompt (PS1) setting.'
  3. Go back to terminal, create a new environment with conda create -n ENV_NAME python=3.9
  4. Activate the new environment by conda activate ENV_NAME
  5. Check the environment name in the prompt (which will still be base)
  6. Check the actual environment name by typing the command conda info, the 'active environment' will be ENV_NAME
  7. Go to 'Settings -> Features'
  8. Deactivate 'Honor user's custom prompt (PS1) setting.'
  9. Now check the environment name in the prompt (which will change to ENV_NAME)
  10. Redo step 6 and confirm the 'active environment' to be ENV_NAME.
Expected behaviour
When 'Honor user's custom prompt (PS1) setting.' feature is activated, the environment name shown in the prompt should be the same as the active environment name. In the above procedure, the environment name shown in the prompt should be ENV_NAME in step 5, the same as the active environment in step 6.
Screenshots

https://user-images.githubusercontent.com/49715782/171995045-7d6b2f8a-3020-46a6-8426-30e9c3f64e69.mov

Operating System

MacOS

OS Version

12.4

Shell Version

zsh 5.8.1 (x86_64-apple-darwin21.0)

Warp Version

v0.2022.05.30.09.10.stable_02

Additional context
Mac: 2021 14' MacBook Pro
Anaconda version: Anaconda3-2022.05-MacOSX-arm64
Python version: 3.9
Warp Internal (ignore): linear-label:24888f54-df93-45d5-9bdd-e38f740cac19

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.