Installing && Customizing The Fish Shell - step by step
FISH - the F/riendly I/nteractive S/H/ell
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.
Here is a list of some of the fish shell features:
Autosuggestions
![Autosuggestion Thumbnail](https://fishshell.com/assets/img/screenshots/autosuggestion_thumb.png)
fish suggests commands as you type based on history and completions, just like a web browser. Watch out, Netscape Navigator 4.0!
Glorious VGA Color
![Colors Thumbnail](https://fishshell.com/assets/img/screenshots/colors_thumb.png)
fish supports 24 bit true color, the state of the art in terminal technology. Behold the monospaced rainbow.
Sane Scripting
![Scripting Thumbnail](https://fishshell.com/assets/img/screenshots/scripting_thumb.png)
fish is fully scriptable, and its syntax is simple, clean, and consistent. You'll never write esac again.
Web Based Configuration
![Web Config Thumbnail](https://fishshell.com/assets/img/screenshots/web_config_thumb.png)
For those lucky few with a graphical computer, you can set your colors and view functions, variables, and history all from a web page.
Man Page Completions
![Man Page Completions Thumbnail](https://fishshell.com/assets/img/screenshots/man_completions_thumb.png)
Other shells support programmable completions, but only fish generates them automatically by parsing your installed man pages.
Works Out of the Box
![Works Out of the Box Thumbnail](https://fishshell.com/assets/img/screenshots/works_out_of_the_box_thumb.png)
fish will delight you with features like tab completions and syntax highlighting that just work, with nothing new to learn or configure.
Installation && Configuration
# Update Repo's
$ sudo apt-get update
# Install Fish
$ sudo apt install fish
# Set Fish Shell as default
chsh -s $(which fish)
# Run Fish Shell
fish
# Remove Greeting
set fish_greeting
# Install curl and git
$ sudo apt install curl
$ sudo apt install git
# Install powerline fonts
$ sudo apt install fonts-powerline
# show full path
$ set -U fish_prompt_pwd_dir_length 0
Setting up custom settings
# Setup custom prompt
sudo gedit ~/.config/fish/functions/fish_prompt.fish
Inside fish_prompt.fish:
# for user (default bash theme):
function fish_prompt -d "Write out the prompt"
printf (set_color green --bold)'%s@%s'(set_color normal)':%s%s%s$ ' $USER $hostname \
(set_color blue --bold) (prompt_pwd) (set_color normal)
end
# for root (clean):
function fish_prompt -d "Write out the prompt"
printf (set_color normal --bold)'%s@%s'(set_color normal)':%s%s%s# ' $USER $hostname \
(set_color normal --bold) (prompt_pwd) (set_color normal)
end
# Create an alias (example)
alias aliasname "actualcommand"