config
config copied to clipboard
Fish shows error messages if user sources .profile, .bash_profile etc in their config.fish
Fig sources ~/.fig/fig.sh
in .profile, .bash_profile, .zprofile, .zshrc, .bashrc
If a fish
user sources one of these files in their config.fish or something in their conf.d folder, this means ~/.fig/fig.sh
is also sourced. But ~/.fig/fig.sh
is invalid fish syntax and so throws a bunch of errors
e..g if statement is invalid, setting variables is wrong etc
Solution
At the start of ~/.fig/fig.sh
, we need to check if the user is running fish
and then not run the rest of the file if so