diff --git a/dot_config/fish/functions/fish_greeting.fish b/dot_config/fish/functions/fish_greeting.fish index b61037b..79cf236 100644 --- a/dot_config/fish/functions/fish_greeting.fish +++ b/dot_config/fish/functions/fish_greeting.fish @@ -1,19 +1,21 @@ #!/usr/bin/env fish -function fish_greeting - set -f cmd +if status --is-interactive + function fish_greeting + set -f cmd - if command -v fortune &>/dev/null - set -a cmd fortune + if command -v fortune &>/dev/null + set -a cmd fortune + end + + if command -v cowsay &>/dev/null + set -a cmd cowsay + end + + if command -v lolcat &>/dev/null + set -a cmd "lolcat -t" + end + + fish -c (string join ' | ' $cmd) end - - if command -v cowsay &>/dev/null - set -a cmd cowsay - end - - if command -v lolcat &>/dev/null - set -a cmd "lolcat -t" - end - - fish -c (string join ' | ' $cmd) end