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.
The recommended way to install VirtualFish is to first install Pipx and then run:
pipx install virtualfish pipx ensurepath
Alternatively, you can first install uv and then run:
uv tool install virtualfish uv tool update-shell
Yet another option is to use Pip:
python -m pip install --user virtualfish fish_add_path (python3 -c "import site; print(site.USER_BASE)")/bin
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 fishin order to make these changes active in your current shell session.Customize your
fish_promptas described below.
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.
Un-installing
To un-install VirtualFish, run:
vf uninstall
python -m pip uninstall virtualfish