From 4b2495f28fa420f6271b336b292556bce442b7d3 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 18 Jan 2016 21:56:59 +0100 Subject: [PATCH] Skip greeting on empty variable It used to be that way and we recommend `set fish_greeting` (i.e. set to empty) in the docs - possibly since we check if the variable is defined on upgrade. --- share/functions/__fish_config_interactive.fish | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 0dbd3ee12..3702c075d 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -92,7 +92,9 @@ function __fish_config_interactive -d "Initializations that should be performed if functions -q fish_greeting fish_greeting else - set -q fish_greeting; and echo $fish_greeting + # The greeting used to be skipped when fish_greeting was empty (not just undefined) + # Keep it that way to not print superfluous newlines on old configuration + test -n "$fish_greeting"; and echo $fish_greeting end #