Skip to content

Fish shell with python virtual environements #9270

Closed Answered by faho
andreichalapco asked this question in Q&A
Discussion options

You must be logged in to vote

Python's activate.fish script does this by default, unless you have set $VIRTUAL_ENV_DISABLE_PROMPT.

So either you are using some other method to activate your virtual environment, or the prompt you are using disables it, presumably to show it elsewhere. E.g. our "disco" sample disables it to display the venv itself on the right side:

set -q VIRTUAL_ENV_DISABLE_PROMPT
or set -g VIRTUAL_ENV_DISABLE_PROMPT true
set -q VIRTUAL_ENV
and set -l venv (string replace -r '.*/' '' -- "$VIRTUAL_ENV")
set_color normal
string join " " -- $venv $duration $vcs $d

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@andreichalapco
Comment options

@faho
Comment options

Answer selected by faho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants