Fish
Get Started

Get Started

fish is a smart and user-friendly command line shell for Linux, macOS, and the rest of the family.

Official Website

Install

I'm only show the installation guide for macOS and Linux, but you can easier found the steps for other operating systems on the official website.

If you are a macOS user, you probably have Homebrew (opens in a new tab) installed, so, only one command on your terminal and it's done!

brew install fish

Set as default shell

If you want to use fish as your default shell you need to run the following command:

echo /usr/local/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish

Remember: /usr/local/bin/fish is the path of your fish installation. To get the path run which fish.

Common Problems

💡

If on your Visual Studio Code the shell don't change please follow the steps below.

  1. Open your Visual Studio Code;
  2. Open the settings.json (not the settings UI);
  3. Add the code inside the JSON curly brackets.
macOS
{
    // ...
    "terminal.integrated.defaultProfile.osx": "fish",
}
Linux
{
    // ...
    "terminal.integrated.defaultProfile.linux": "fish",
}

Delete entire line on macOS

On macOS if you press CMD + Backspace, with fish you probably will get an error but, for me, this is a useful shortcut to delete the entire line.

For this work you only need to do this:

  1. On you terminal write nano ~/.config/fish/functions/fish_user_key_bindings.fish and paste the content:
bind ~ew backward-kill-line

And now will work!