2

When I'm activating python virtual environment, fish always prints venv name in brackets before my fish promt.

antonio:~/W/s/src > 
antonio:~/W/s/src > source ../env/bin/activate.fish
(env) antonio:~/W/s/src > 

I want to avoid this (env) thing and handle virtual envs by my custom fish_prompt function.

it's doesn't matter, what code I have in ~/.config/fish/functions/fish_prompt.fish - fish always prints (env) and only after that executes my fish_prompt.fish function

Antonio
  • 822
  • 1
  • 10
  • 19

1 Answers1

5

The (env) is not prepended by fish. It is done by the virtualenv itself.

You may disable the behavior by exporting VIRTUAL_ENV_DISABLE_PROMPT=1. See this answer about setting virtualenv prompt.

Vojtech Kane
  • 559
  • 6
  • 21