default prompt: Set fish_color_status if unset

Otherwise this'll error with --no-config
This commit is contained in:
Fabian Homborg 2021-04-11 12:34:27 +02:00
parent 5ddb1adac1
commit 0420901cb2
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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