Suppress or Customize Intro Message in Fish Shell

Warning: No longer works since fish 2.4.0—see Kevin's answer for the correct contemporary solution.

If there is no environment variable named "fish_greeting", then nothing will be printed. By default, there is a fish_greeting variable. You can erase this:

set --erase fish_greeting

Kevin's answer works fine for static text. If you need an interactive welcome message, such as mine involving the fortune command, you can do

function fish_greeting

Create your fish_greeting function. I just have

function fish_greeting
    fortune
end

and save it with

funcsave fish_greeting

Found that the greeting message is set in fishd.Machine.local. To override the following to ~/.config/fish/config.fish:

set fish_greeting

Tags:

Fish