<!--
.. title: Teaching an old dog to Fish
.. slug: teaching-an-old-dog-to-fish
.. date: 2014-10-10 14:38:47
.. category: tools
.. tags: fish
.. description: 
-->

Inspired by the recent furore around [Shellshock](https://en.wikipedia.org/wiki/Shellshock_%28software_bug%29)
I decided that it was time to try an alternative to [bash](https://www.gnu.org/software/bash/)
By the very grown up process of shutting my eyes and poking my finger at the results of a [search](http://duckduckgo.com/)
for "shell" I ended up at [fish shell](http://fishshell.com/), described by the project as "a command line shell for the 90s". I'm presuming that this means the 1990s and is not a minimum age requirement.

I'm quite enjoying it so far but the missing piece for me was something equivalent to the very useful [virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/en/latest/). 
Luckily for me someone else has already had this problem and wrote [virtual fish](https://github.com/adambrenecki/virtualfish/).
For which many thanks. I did have a little trouble with installation and configuration. I'm sure that this was entirely my own fault but as a reminder for me and anyone else who stumbles on this here is what I did.

 * Downloaded `virtual.fish` from the [Github repo](https://github.com/adambrenecki/virtualfish/releases) to `~/bin`
 * Because I don't use `~/.virtualenvs` to store my virtual environments I added `set -x VIRTUALFISH_HOME ~/Work/envs/` to my `.config/fish/fish.config` file
 * Included the currently active virtual environment name in my prompt by following the [instructions](http://virtualfish.readthedocs.org/en/latest/install.html#customizing-your-fish-prompt). A trap for young players is to make sure that you do `funcsave fish_prompt` as instructed. I missed this out the first couple of times and kept wondering why my prompt was wrong.

**Update**: Thanks for the comments. bronsen - yes I do source `virtual.fish` in my `config.fish`. Or at least I did until jl pointed me at [Pew](https://github.com/berdario/pew). Now I've switched to that from virtualenvwrapper and virtual.fish and I must say that it works like a dream. Thanks both for taking the time to leave a comment.
