Search code examples
perlshellfish

How do I use local::lib with fish shell?


I'm still quite new to fish shell but this is really important for making me want to stay using it.

If I try and activate local::lib with a normal bash style command:

eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"

I get:

$(...) is not supported. In fish, please use '(perl)'.
fish: eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"

Solution

  • Just remove $ and double quotes in "$()",

    eval (perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)