Open
Description
I installed goto recently on WSL. It didn't work from the first try. So I installed it myself in a different directory where I put most of my global scripts.
But when I investigated the goto script, I realized that it checks if you have a .bashrc file but also checks if you have .zshrc.
However, if it finds .bashrc, it adds the the sourcing script to it and ignore .zshrc.
I have tested the script you guys used to decide which file to use and here is the output:
@DESKTOP-C64TQ1G ➜ testingStuff if [ -f ~/.bashrc ]; then
then> echo ".bashrc exists"
then> fi
.bashrc exists
@DESKTOP-C64TQ1G ➜ testingStuff if [ -f ~/.zshrc ]; then
echo ".zshrc exists"
fi
.zshrc exists
@DESKTOP-C64TQ1G ➜ testingStuff if [ -f ~/.bashrc ]; then
echo "bashrc exists"
elif [ -f ~/.zshrc ]; then
echo "zshrc exists"
fi
bashrc exists
I think the correct behavior in this case is to add it to .zshrc since IF zsh is used, it usually ignores .bashrc and uses its own .zshrc .