Allow fish_greeting to be NULL or an array

Treat fish_greeting as a whole when show up the greeting messages. And
the user may want to set fish_greeting to an null value or an array.
This requires that the variable be quoted when used as an argument for
switch in __fish_config_interactive.

Signed-off-by: James Vega <jamessan@debian.org>
[modified the commit message]
Signed-off-by: Grissiom <chaos.proton@gmail.com>
This commit is contained in:
James Vega 2010-11-24 00:49:15 +08:00 committed by Grissiom
parent 9b97c55546
commit 4f9b07e979

View file

@ -150,7 +150,7 @@ function __fish_config_interactive -d "Initializations that should be performed
fish_greeting
else
if set -q fish_greeting
switch $fish_greeting
switch "$fish_greeting"
case ''
# If variable is empty, don't print anything, saves us a fork