From 0420901cb28125ef0d0b7581b0440bbec9a164a3 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 11 Apr 2021 12:34:27 +0200 Subject: [PATCH] default prompt: Set fish_color_status if unset Otherwise this'll error with --no-config --- share/functions/fish_prompt.fish | 2 ++ share/tools/web_config/sample_prompts/default.fish | 2 ++ 2 files changed, 4 insertions(+) diff --git a/share/functions/fish_prompt.fish b/share/functions/fish_prompt.fish index 20fe6cc50..dbfa1ac0e 100644 --- a/share/functions/fish_prompt.fish +++ b/share/functions/fish_prompt.fish @@ -5,6 +5,8 @@ function fish_prompt --description 'Write out the prompt' set -l last_pipestatus $pipestatus set -lx __fish_last_status $status # Export for __fish_print_pipestatus. set -l normal (set_color normal) + set -q fish_color_status + or set -g fish_color_status --background=red white # Color the prompt differently when we're root set -l color_cwd $fish_color_cwd diff --git a/share/tools/web_config/sample_prompts/default.fish b/share/tools/web_config/sample_prompts/default.fish index 20fe6cc50..dbfa1ac0e 100644 --- a/share/tools/web_config/sample_prompts/default.fish +++ b/share/tools/web_config/sample_prompts/default.fish @@ -5,6 +5,8 @@ function fish_prompt --description 'Write out the prompt' set -l last_pipestatus $pipestatus set -lx __fish_last_status $status # Export for __fish_print_pipestatus. set -l normal (set_color normal) + set -q fish_color_status + or set -g fish_color_status --background=red white # Color the prompt differently when we're root set -l color_cwd $fish_color_cwd