From 07c828a78eb23c12de548504ef480fef183fc7d7 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Fri, 12 Jan 2024 15:26:00 -0800 Subject: [PATCH] Edit cowsay and fortune conditions --- init.zsh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/init.zsh b/init.zsh index 2bfa86b..2ed1e2d 100644 --- a/init.zsh +++ b/init.zsh @@ -305,10 +305,13 @@ HISTORY_SUBSTRING_SEARCH_PREFIXED="true" HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="" setopt histignoredups +# Run fortune and cowsay if we are not in nvim or ssh +if cmd_exists fortune && cmd_exists cowsay; then + [[ -v NVIM ]] || [[ -v SSH_CLIENT ]] || \ + fortune | cowsay -felephant-in-snake -n +fi + # Clean up internal functions unfunction load_plugin unfunction cmd_exists unfunction source_user_file - -# Run fortune and cowsay if we are not in nvim -[[ -v NVIM ]] || fortune | cowsay -felephant-in-snake -n