From cb687f904742add74a1dc7360ea1b4c6b85b029e Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Sun, 21 Apr 2024 13:51:00 -0700 Subject: [PATCH] Update .config/fish/functions/fish_greeting.fish --- dot_config/fish/functions/fish_greeting.fish | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dot_config/fish/functions/fish_greeting.fish b/dot_config/fish/functions/fish_greeting.fish index 8516e35..b61037b 100644 --- a/dot_config/fish/functions/fish_greeting.fish +++ b/dot_config/fish/functions/fish_greeting.fish @@ -1,5 +1,19 @@ #!/usr/bin/env fish function fish_greeting - fortune | cowsay | lolcat + set -f cmd + + 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