From 286ce1d6a45ccfb2d91bfc9b8bcaff06d4f0c558 Mon Sep 17 00:00:00 2001 From: liljencrantz Date: Wed, 9 Jan 2008 01:27:08 +1000 Subject: [PATCH] Only set the fish greeting variable on the very first startup darcs-hash:20080108152708-75c98-d1aa82fbcf070b74f402a6b33e687ccf615fb104.gz --- share/functions/__fish_config_interactive.fish | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index cf6e3f142..e4003a1a3 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -77,10 +77,16 @@ function __fish_config_interactive -d "Initializations that should be performed # Print a greeting # - if not set -q fish_greeting - set -l line1 (printf (_ 'Welcome to fish, the friendly interactive shell') ) - set -l line2 (printf (_ 'Type %shelp%s for instructions on how to use fish') (set_color green) (set_color normal)) - set -U fish_greeting $line1\n$line2 + # + # If we are starting up for the first time, set the default greeting + # + if not set -q __fish_init_1_23_0 + if not set -q fish_greeting + set -l line1 (printf (_ 'Welcome to fish, the friendly interactive shell') ) + set -l line2 (printf (_ 'Type %shelp%s for instructions on how to use fish') (set_color green) (set_color normal)) + set -U fish_greeting $line1\n$line2 + end + set -U __fish_init_1_23_0 end switch $fish_greeting