Edit cowsay and fortune conditions

This commit is contained in:
Alexander Rosenberg 2024-01-12 15:26:00 -08:00
parent 6a35848f7a
commit 07c828a78e
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -305,10 +305,13 @@ HISTORY_SUBSTRING_SEARCH_PREFIXED="true"
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="" HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=""
setopt histignoredups 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 # Clean up internal functions
unfunction load_plugin unfunction load_plugin
unfunction cmd_exists unfunction cmd_exists
unfunction source_user_file unfunction source_user_file
# Run fortune and cowsay if we are not in nvim
[[ -v NVIM ]] || fortune | cowsay -felephant-in-snake -n