From c7978c9fe35436ddb57f4a63aa33d91455feddea Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Sun, 6 Oct 2024 17:17:39 -0700 Subject: [PATCH] Update .config/fish/functions/fish_greeting.fish --- dot_config/fish/functions/fish_greeting.fish | 30 +++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) 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