Installation and Setup¶
Make sure you’re running Fish 2.x. If you’re running an Ubuntu LTS release that has an older Fish version, install Fish 2.x via the fish-shell/release-2 PPA.
Install virtualfish by running
pip install virtualfish.
Add the following to your
eval (python -m virtualfish)
If you want to use virtualfish with plugins, list the names of the plugins as arguments to the virtualfish loader:
eval (python -m virtualfish compat_aliases)
Note: If your
$PATH, you should ensure that you load virtualfish after those modifications.
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 virtualenv to your prompt is to type
funced fish_prompt, add the following line in somewhere:
if set -q VIRTUAL_ENV echo -n -s (set_color -b blue white) "(" (basename "$VIRTUAL_ENV") ")" (set_color normal) " " end
funcsave fish_prompt to save your new prompt to disk.