How to set user paths in Fish Shell
$ composer global require themsaid/ibis
To check whether the package is installed or not, I ran the following command.
$ ibis --help
But, I got the following error.
fish: Command 'ibis' not found
I was like, what the hell? I just installed the package globally. So, it should be available in the shell right away!
I checked the
~/.config/composer/vendor/bin directory and found that the
ibis executable was there.
I did some digging and found out that the
~/.config/composer/vendor/bin directory was not in my Fish Shell’s
fish_user_paths variable. And because of that, Fish Shell was not able to find the
I’m using Ubuntu 22.04 for your reference.
Setting user paths in Fish Shell
To fix this, I ran the following command.
$ set -U fish_user_paths $fish_user_paths $HOME/.config/composer/vendor/bin
This will add the
~/.config/composer/vendor/bin directory to the
fish_user_paths variable. And because of that, Fish Shell will be able to find the
You can replace the
~/.config/composer/vendor/bin directory with any other directory that you want to add to the
The manual way
Alternatively, you can manually add the following line to your
set -U fish_user_paths $HOME/.config/composer/vendor/bin
Save the file and restart your terminal. Now, your Fish Shell will be able to find any executable installed globally via Composer.