config icon indicating copy to clipboard operation
config copied to clipboard

Fish shows error messages if user sources .profile, .bash_profile etc in their config.fish

Open brendanfalk opened this issue 3 years ago • 0 comments

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

brendanfalk avatar Jun 05 '21 20:06 brendanfalk