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
|
||||
Catppuccin colors 30+ fish_color_* variables set to Mocha palette
|
||||
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
|
||||
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
|
||||
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
|
||||
11:39:00 ← success (no ✘)
|
||||
✘ 1 myctx Fri Jun 12 00:51:21 2026 ← failed, starship+C3 active
|
||||
✘ 1 Fri Jun 12 00:51:21 2026 ← failed, fallback prompt
|
||||
Fri Jun 12 00:51:21 2026 ← success (no ✘)
|
||||
|
||||
### FZF
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
# fish_right_prompt
|
||||
#
|
||||
# DESCRIPTION
|
||||
# Renders the right-side prompt. Shows a red ✘ with the exit code when the
|
||||
# last command failed (hidden on success), followed by the current time in
|
||||
# Catppuccin Overlay0 (dim). Rendered regardless of C3 state so it pairs
|
||||
# correctly with both the starship and the Catppuccin fallback left prompt.
|
||||
# Renders the right-side prompt. Always shows a dim timestamp. When the last
|
||||
# command failed, prefixes it with a red ✘ and the exit code. When starship
|
||||
# is installed and C3 overrides are enabled, also shows the active Docker
|
||||
# context (if non-default) — that block is paired with the starship prompt
|
||||
# which already guards on both conditions.
|
||||
#
|
||||
# RETURNS
|
||||
# 0 Always
|
||||
@@ -25,8 +26,18 @@ function fish_right_prompt
|
||||
set_color normal
|
||||
end
|
||||
|
||||
# Docker context — only relevant alongside the starship prompt
|
||||
if type -q starship; and __fish_config_op_enabled __fish_config_op_overrides
|
||||
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 +%X
|
||||
date "+%a %b %d %H:%M:%S %Y"
|
||||
set_color normal
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user