fix: restore docker context behind starship+C3 guard, use long date format in right prompt
This commit is contained in:
+6
-4
@@ -1593,7 +1593,7 @@ all of them.
|
|||||||
Starship prompt fish_prompt replaced by Starship + OSC 133 markers
|
Starship prompt fish_prompt replaced by Starship + OSC 133 markers
|
||||||
Catppuccin colors 30+ fish_color_* variables set to Mocha palette
|
Catppuccin colors 30+ fish_color_* variables set to Mocha palette
|
||||||
FZF_DEFAULT_OPTS FZF themed to Catppuccin Mocha colors
|
FZF_DEFAULT_OPTS FZF themed to Catppuccin Mocha colors
|
||||||
Right prompt fish_right_prompt: exit code (on failure) + dim timestamp; always rendered
|
Right prompt fish_right_prompt: exit code (on failure) + dim timestamp; always rendered; Docker context added when starship+C3 active
|
||||||
|
|
||||||
The bang-bang system spans key_bindings.fish, abbr.fish, puffer.fish, and
|
The bang-bang system spans key_bindings.fish, abbr.fish, puffer.fish, and
|
||||||
six expand_bang_*.fish functions. All are gated together — disabling C3
|
six expand_bang_*.fish functions. All are gated together — disabling C3
|
||||||
@@ -1717,10 +1717,12 @@ Elements:
|
|||||||
|
|
||||||
The right prompt (fish_right_prompt.fish) always renders, regardless of C3
|
The right prompt (fish_right_prompt.fish) always renders, regardless of C3
|
||||||
state. On failure it shows a red ✘ and the exit code; on success it shows
|
state. On failure it shows a red ✘ and the exit code; on success it shows
|
||||||
only the dim timestamp:
|
only the dim timestamp. When starship is installed and C3 is enabled, the
|
||||||
|
active Docker context is also shown (if non-default):
|
||||||
|
|
||||||
✘ 1 11:39:00 ← failed command
|
✘ 1 myctx Fri Jun 12 00:51:21 2026 ← failed, starship+C3 active
|
||||||
11:39:00 ← success (no ✘)
|
✘ 1 Fri Jun 12 00:51:21 2026 ← failed, fallback prompt
|
||||||
|
Fri Jun 12 00:51:21 2026 ← success (no ✘)
|
||||||
|
|
||||||
### FZF
|
### FZF
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
# fish_right_prompt
|
# fish_right_prompt
|
||||||
#
|
#
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
# Renders the right-side prompt. Shows a red ✘ with the exit code when the
|
# Renders the right-side prompt. Always shows a dim timestamp. When the last
|
||||||
# last command failed (hidden on success), followed by the current time in
|
# command failed, prefixes it with a red ✘ and the exit code. When starship
|
||||||
# Catppuccin Overlay0 (dim). Rendered regardless of C3 state so it pairs
|
# is installed and C3 overrides are enabled, also shows the active Docker
|
||||||
# correctly with both the starship and the Catppuccin fallback left prompt.
|
# context (if non-default) — that block is paired with the starship prompt
|
||||||
|
# which already guards on both conditions.
|
||||||
#
|
#
|
||||||
# RETURNS
|
# RETURNS
|
||||||
# 0 Always
|
# 0 Always
|
||||||
@@ -25,8 +26,18 @@ function fish_right_prompt
|
|||||||
set_color normal
|
set_color normal
|
||||||
end
|
end
|
||||||
|
|
||||||
# Timestamp — Catppuccin Overlay0 (dim)
|
# Docker context — only relevant alongside the starship prompt
|
||||||
set_color '#6c7086'
|
if type -q starship; and __fish_config_op_enabled __fish_config_op_overrides
|
||||||
date +%X
|
set -l docker_ctx (docker context show 2>/dev/null)
|
||||||
|
if test -n "$docker_ctx"; and test "$docker_ctx" != default
|
||||||
|
set_color blue
|
||||||
|
echo -n " $docker_ctx "
|
||||||
|
set_color normal
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Timestamp — Catppuccin Overlay0 (dim)
|
||||||
|
set_color '#6c7086'
|
||||||
|
date "+%a %b %d %H:%M:%S %Y"
|
||||||
set_color normal
|
set_color normal
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user