From 39c16a7770457ce3f10a7cd049997ed6dd43d023 Mon Sep 17 00:00:00 2001 From: liljencrantz Date: Sun, 13 Jan 2008 04:53:19 +1000 Subject: [PATCH] Add check for existance of fish_greeting variable darcs-hash:20080112185319-75c98-3b5231b1a956c94e8800dae033f3672622104340.gz --- share/functions/__fish_config_interactive.fish | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 7c5c8626d..28365bd81 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -146,12 +146,14 @@ function __fish_config_interactive -d "Initializations that should be performed # Print a greeting # - switch $fish_greeting - case '' - # If variable is empty, don't print anything, saves us a fork + if set -q fish_greeting + switch $fish_greeting + case '' + # If variable is empty, don't print anything, saves us a fork - case '*' - echo $fish_greeting + case '*' + echo $fish_greeting + end end #