Fish provides a set of commands for configuring your shell directly in the terminal, eliminating the need to edit a config file. In zsh and bash, you would typically open ~/.bashrc
or ~/.zshrc
to add your own config. Similarly, in Fish, you can edit /.config/fish/config.fish
. However, Fish offers convenient commands to fulfill most of your configuration needs. To begin with, start typing fish_
in terminal and press TAB
. You’ll see a list of commands. Some of my favorites are:
fish_greeting
This is the message Fish displays the first time you open a terminal tab. Use the set -g
command to change it to whatever you want. -g
stands for global variable (see MAN page for set
).
set -g fish_greeting 'Oh shit, here we go again...'
The result:
fish_config
Opens a config page like this in your browser:
On top of customizing your Fish theme, you can also change the default prompt you see in Fish, see a list of available functions (including the ones you have defined in config.fish
), see all (environmental) variables, view history (it’s quite long…), and see all keyboard shortcuts (bindings) supported by Fish.