diff options
author | 2015-12-29 15:58:48 +0100 | |
---|---|---|
committer | 2015-12-29 15:58:48 +0100 | |
commit | 834ebef53cf8f58ad53344b053f6d3225d78e0fd (patch) | |
tree | 295003a522d19fd2623d96a1b8e0babf12d77d42 /share/functions/__fish_config_interactive.fish | |
parent | bb932a0a0a9d860af5311714cad40660489b6556 (diff) |
Simplify greeting
We have already confirmed we're interactive, and `echo` is a builtin now.
Diffstat (limited to 'share/functions/__fish_config_interactive.fish')
-rw-r--r-- | share/functions/__fish_config_interactive.fish | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index c3864a8f..5afc30f0 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -101,24 +101,15 @@ function __fish_config_interactive -d "Initializations that should be performed eval "$__fish_bin_dir/fish -c 'fish_update_completions > /dev/null ^/dev/null' &" end - if status -i - # - # Print a greeting - # - - if functions -q fish_greeting - fish_greeting - else - if set -q fish_greeting - switch "$fish_greeting" - case '' - # If variable is empty, don't print anything, saves us a fork + # + # Print a greeting + # fish_greeting can be a function (preferred) or a variable + # - case '*' - echo $fish_greeting - end - end - end + if functions -q fish_greeting + fish_greeting + else + set -q fish_greeting; and echo $fish_greeting end # |