【Tool Recommendation】——fish-shell, a useful shell tool for macOS

Personal Introduction

Make your shell look better and be more convenient

Tutorial

Official Introduction

fish is a smart and user-friendly command line shell for macOS, Linux, and the rest of the family. fish includes features like syntax highlighting, autosuggest-as-you-type, and fancy tab completions that just work, with no configuration required.

For downloads, screenshots and more, go to https://fishshell.com/.

Note that if installed via brew, the path for fish is

/opt/homebrew/bin/fish

Whereas if installed via the official method, the path is

/usr/local/bin/fish

You can check the path of fish on your computer from another shell using this command (for example, here I am in zsh):

❯ which fish
/opt/homebrew/bin/fish

Reference

This article was converted by 简悦 SimpRead, original source at gist.github.com

Install fish shell on macOS Mojave with brew. GitHub Gist: instantly share code, notes, and snippets…

Fish is a smart and user-friendly command line shell (like bash or zsh). This is how you can install Fish on macOS and make it your default shell.

Note that you need the https://brew.sh/ package manager installed on your machine.

brew install fish

More info: https://fishshell.com/docs/current/tutorial.html#tut_path

Check the fish path with which fish. In the examples below, it was located at: /opt/homebrew/bin/fish. On older Macs the default path is /usr/local/bin/fish, replace accordingly in the instruction below.

Make fish the default shell

macOS allows you to change your default shell using command line or GUI methods https://support.apple.com/en-us/102360.

Using the terminal:

  1. check the fish path with which fish. In the examples below it was located at: /opt/homebrew/bin/fish. On older Macs the path might differ.
  2. chsh -s /opt/homebrew/bin/fish

Add brew binaries in fish path

run the command: fish_add_path /opt/homebrew/bin

To collect command completions for all commands run:

fish_update_completions

I edited the ~/.config/fish/config.fish to have my terminal in English

set -x LANG en_US.UTF-8

You can configure your shell by launching the web interface, run:

fish_config