Installation and Setup¶
Installing¶
Make sure you are running Fish 3.1+. If you are running an Ubuntu LTS release that has an older Fish version, install Fish via the Fish 3.x release series PPA.
Install VirtualFish by running:
pip install virtualfish
Install the VirtualFish loader by running:
vf install
If you want to use VirtualFish with plugins, list the names of the plugins as arguments to the install command:
vf install compat_aliases projects environment
Note: After performing the above step, you will be prompted to run
exec fish
in order to make these changes active in your current shell session.Customize your
fish_prompt
Customizing Your fish_prompt
¶
VirtualFish doesn’t attempt to mess with your prompt. Since Fish’s prompt is a function, it is both much less straightforward to change it automatically, and much more convenient to simply customize it manually to your liking.
The easiest way to add the active virtual environment’s name to your prompt is
to type funced fish_prompt
and add the following line somewhere:
if set -q VIRTUAL_ENV
echo -n -s (set_color -b blue white) "(" (basename "$VIRTUAL_ENV") ")" (set_color normal) " "
end
Then, type funcsave fish_prompt
to save your new prompt to disk.