Moving on to Fish shell (and beyond)
While chatting with one of my WL colleague, I stumbled upon Fish shell. I immediately liked its autocompletion and extensibility mechanisms. After many years using BASH and ZSH, I therefore decided to move on to this new shell.
Unlike the others, it’s not POSIX-compatible.
Furthermore, to get (at least) the same functionalities as OhMyZsh, I chose to install StarShip.
I will then describe how I moved on and updated my existing tools such as SdkMan.
1 FISH Installation
To install it, run this command:
sudo apt install fish
You must also use a font available on the NerdFonts website. By the way, you can also use the fonts available through your package manager.
For instance, I chose using JetBrains Mono
After downloading it, you can reload your font cache running this command:
fc-cache -fv
2 StarShip installation
I ran this command:
curl -sS https://starship.rs/install.sh | sh
I also added the following command at the end of ~/.config/fish/config.fish
:
starship init fish | source
Due to some WSL2 incompatibilities, I also chose to use the plain text presets running this command:
starship preset plain-text-symbols -o ~/.config/starship.toml
3 SDKMAN update
At this stage, SdkMan didn’t work at all. To put it alive again, I had to install Fisher and a SdkMan for fish plugin.
3.1 Fisher install
Run this command:
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
3.2 SdkMan for fish plugin
Run this command:
fisher install reitzig/sdkman-for-fish@v2.0.0
3.3 Run SdkMan
Run this command:
sdk ug
Say yes and restart a shell. Now it should work.
4 NVM
I had the same issue with NVM.
I then installed another plugin with Fisher:
fisher install jorgebucaran/nvm.fish
5 GnuPG
I use GnuPG for signing my GIT commits. Installing Fisher broke my setup.
I then added this new configuration file $HOME/.config/fish/conf.d/config_gpgagent.fish
with the following content:
set -gx GPG_TTY /dev/pts/0
To activate it, restart your shell (again).
6 Conclusion
I can now use FISH for my daily job. As I said first, this article is only a reminder for my next setups (aka when I will broke my GNU/Linux boxes and try to restore them).
Hope it will help you!