Search code examples
fish

How do I mix functions and plain text for setting the fish greeting?


The function solution here works fine. Suppress or Customize Intro Message in Fish Shell

However I can't seem to insert text as well. Essentially I want to display the fish_logo from OMF, then beneath it my own message.

I thought perhaps to enclose the text in ', or " but I get an error. I tried without any enclosures and got an error.

This is what I thought would work.

function fish_greeting
    fish_logo
    'Hello Phil. What magic shall we create today?'
end

Solution

  • To output text, use echo thetext.

    So

    function fish_greeting
        fish_logo
        echo 'Hello Phil. What magic shall we create today?'
    end