Fish is a command interpreter; one of several translators between User and Operating System known as shell, such as: cmd, PowerShell, bash, zsh, etc..
One of the best things of Fish is that the AutoComplete and AutoSuggestion features are factory-installed, ready to use with no need to install or configure.
Click here to learn more about Fish Shell
Since Fish is a shell for Unix, that means, it doesn't work on standard Windows, so you will need to install Windows Subsystem for Linux (WSL)
Before proceeding with this tutorial, create a System Restore Point (C:/) - ALWAYS do that when installing or changing Windows settings.
Open Command Prompt (cmd) as Administrator and run the command below.
Note: If
wsl --install
returns the HELP Menu, this means you already have wsl installed - go to the next step
wsl --install
Note: If Ctrl + v doesn't work in the terminal, press the right mouse button to paste.
wsl --install
will execute the following actions:
- Enables the WSL and Virtual Machine Platform components
- Downloads and install the latest Linux Kernel
- Downloads and installs the Ubuntu Linux distribution
After complete installation, Restart your Computer
Note: If the auto installation fails, install manually
Now that WSL has been installed, click on the Start Menu and open the "app" Ubuntu
Note: If the app doesn't appear, click here and search for Ubuntu, select the installed version and click Start
Wait for the installation to finish and register a username and password
Open cmd and run the command bash
or wsl
to access your Linux (Ubuntu) environment
sudo apt-add-repository ppa:fish-shell/release-3
Note: if
apt-add-repository
is a not found command runsudo apt-get install software-properties-common
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install fish
That's it, congratulations, you have installed the Fish Shell on your Windows.
Now just run the command fish
in Ubuntu Terminal (bash or wsl) to access your new shell
Now let's make your terminal look nicer.
We will no longer use the old standard terminal. Click here and install Windows Terminal
- To make some modifications to Fish, it is necessary to install the plugin manager Oh My Fish
Open Windows Terminal and run fish
to access the Fish Shell.
To continue we need Git
sudo apt-get install git
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
You can preview and choose another theme by clicking here
However, in this tutorial we'll install and configure the bobthefish theme
omf install bobthefish
Use the command below to enter the fish folder and open it in Windows
cd ~/.config/fish/ && explorer.exe .
Now open the config.fish
file, paste the codes below and then Save the file
if status is-interactive
# Commands to run in interactive sessions can go here
set -g theme_display_git_default_branch yes
set -g theme_title_display_process yes
set -g theme_title_display_path no
set -g theme_title_use_abbreviated_path no
set -g theme_date_format "+%d/%m/%y %H:%M"
set -g theme_display_user yes
set -g theme_display_hostname yes
set -g fish_prompt_pwd_dir_length 6
set -g theme_display_jobs_verbose yes
end
Click here to learn what each command above does
To replace the "errors" [] with Symbols, we need to install a font from Nerd Fonts. We'll install SourceCode Pro (SauceCodePro NF). To see more Fonts click Here
Enter the folders Italic/complete
Bold/complete
Normal/complete
SemiBold/complete
and download the penultimate Font (ending with "Complete Windows Compatible.ttf")
Go to your Download folder and run all .ttf files to install the font.
Now we can change the terminal font to fix the []
Click on the little arrow > Settings
Click Open JSON file in the lower-left corner of the screen
- Inside "profiles">"default" do the changes below, then Save the file:
- Change the name of the "Ubuntu" you installed to Fish (or any other)
- Add the theme (colorScheme) "Campbell"
- Add the guid of Fish to be the default Windows Terminal Profile
If you want your Terminal to be translucent, add the values below inside "defaults"
Note: Transparency effects must be enabled for this to work. Start Menu > Settings > Personalization > Colors
//"defaults": {
"opacity": 50,
"useAcrylic": true,
"acrylicOpacity": 0.5,
//}
chsh -s /usr/bin/fish
You can choose between two symbol styles: PowerLine Fonts or Nerd Fonts
set -g theme_powerline_fonts yes
or
set -g theme_nerd_fonts yes
Note: Use
yes
to enable andno
to disable (sets only one as YES)