fix: use jobs -c in background loop, reset color after loop, clean up right_prompt
This commit is contained in:
@@ -7,8 +7,8 @@
|
|||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
# Catppuccin Mocha fallback prompt (nim-style, two-line). Active whenever
|
# Catppuccin Mocha fallback prompt (nim-style, two-line). Active whenever
|
||||||
# the starship prompt is not available — either starship is not installed or
|
# the starship prompt is not available — either starship is not installed or
|
||||||
# C3 overrides are disabled. Has no external dependencies; uses only fish
|
# C3 overrides are disabled. Has no external dependencies; uses only fish-provided functions
|
||||||
# builtins (set_color, fish_git_prompt, prompt_pwd, prompt_hostname).
|
# (set_color, fish_git_prompt, prompt_pwd, prompt_hostname).
|
||||||
#
|
#
|
||||||
# RETURNS
|
# RETURNS
|
||||||
# 0 Always; outputs the prompt to stdout
|
# 0 Always; outputs the prompt to stdout
|
||||||
@@ -126,12 +126,13 @@ function fish_prompt
|
|||||||
echo # newline
|
echo # newline
|
||||||
|
|
||||||
# Background jobs (one per line, dim)
|
# Background jobs (one per line, dim)
|
||||||
for job in (jobs)
|
for job in (jobs -c)
|
||||||
set_color $retc
|
set_color $retc
|
||||||
echo -n '│ '
|
echo -n '│ '
|
||||||
set_color $c_dim
|
set_color $c_dim
|
||||||
echo $job
|
echo $job
|
||||||
end
|
end
|
||||||
|
set_color normal
|
||||||
|
|
||||||
# ─── Second line ──────────────────────────────────────────────────────────
|
# ─── Second line ──────────────────────────────────────────────────────────
|
||||||
set_color $retc
|
set_color $retc
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#
|
#
|
||||||
# EXAMPLE
|
# EXAMPLE
|
||||||
# # Rendered automatically by fish; not called directly.
|
# # Rendered automatically by fish; not called directly.
|
||||||
function fish_right_prompt --description 'Execute fish_right_prompt'
|
function fish_right_prompt
|
||||||
set -l last_status $status
|
set -l last_status $status
|
||||||
|
|
||||||
# Failed command: red ✘ + exit code; hidden when 0
|
# Failed command: red ✘ + exit code; hidden when 0
|
||||||
|
|||||||
Reference in New Issue
Block a user