I have a question about the Fish (Friendly Interactive SHell), so I hope somebody can help me out.

Basically I'd like to customize the fish_greeting message. I can easily get it to say anything I'd like, but I'm having problems setting colors for different lines. Please note that I found some instructions from other sites which said to put this inside of config.fish, rather than in /functions/fish_greeting. I couldn't tell you why, but I followed those instructions nevertheless.

This copy of the command I've been working on should make what I just said more clear:

### Set Fish_Greeting to... ###
set fish_greeting '
    (set_color green) "              Hi Ev!          "
    (set_color blue) "      Welcome to the Terminal! "

I'm obviously doing it wrong because when I type fish to test it out, I'm met with:  


(set_color green) "              Hi Ev!          "
(set_color blue) "      Welcome to the Terminal! "

I know that looks like I've formatted something wrong here, but I assure you, those extra empty lines are shown on the terminal.

Does anybody know of a way I could do this easily? Is this something that's much too complicated for what its worth?

Thanks a lot!

I would make the fish greeing into a function, not a variable

function fish_greeting
    set_color green; echo "              Hi Ev!           "
    set_color blue;  echo "      Welcome to the Terminal! "
    set_color normal
funcsave fish_greeting

Your attempt is not working due to the single quotes: you don't get command substitution inside single quotes.

And if it's a function, then ~/.config/fish/functions/fish_greeting is the appropriate place to store it.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.