0

WSL2 running Ubuntu 20.04 | fish 3.3.1 (installed via PPA)

When I try to invoke tools like poetry and rustup (which were installed when I was using bash) in a temporary fish session (by running fish from my default bash shell), I get autocompletions and the tools work. But when I make fish my default shell (chsh -s /usr/bin/fish), I see command not found - these commands are not even picked from history! (Yes, I restarted my terminal after changing the default shell.) Could someone tell me how to rectify this?

0

1 Answer 1

3

Starting from the last one - your command history in bash is stored in .bash_history. Like .bashrc and .bash_aliases, it's read by bash, not by fish. Most likely reason for commands and tools not being found in fish that your $PATH in fish-shell isn't the same as it is in bash.

Restore bash as your default shell, and read up about fish to learn how you can duplicate your bash environment in fish. When a temporary fish-shell works the way you want, you can make it the default shell.

1
  • Thanks, that was helpful. I just checked the $PATH variables from the two shells; while they have many directories in common, the programs that were installed later are missing in fish. Commented Oct 3, 2021 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .