pixegami / terminal-profile

This is my profile for UNIX (MacOS/Linux) terminals.
605 stars 174 forks source link

Does not support python virtual environment #16

Open Ochoja opened 4 months ago

Ochoja commented 4 months ago

When a python virtual environment is activated, It does not display name of virtual environment in brackets like in bash

MarianaECorona commented 3 months ago
  1. Go to the configs directory and open the pixegami file in your IDE.
  2. Update the code of the prompt_virtualenv function as:

prompt_virtualenv() { if [[ -n $CONDA_PROMPT_MODIFIER ]]; then prompt_segment black default ${CONDA_PROMPT_MODIFIER:1:-2} elif [[ -n $VIRTUAL_ENV ]]; then local venv_name venv_name=$(basename "$VIRTUAL_ENV") prompt_segment black default "($venv_name)" fi }

  1. Save the changes
  2. Uninstall and reinstall the project.

This works for me, I hope it helps you too