New `fish` conditional prompt doesn't work properly
Closed this issue · 3 comments
Cc: @donovanglover
Since the last commit to the prompt two weeks ago, my fish theme isn't being applied anymore.
The commit in question is 94d7029 ("fish: fix base16-fish causing startup issues with tmux (#503)").
Specifically, the
test -n "$base16_theme"
condition fails (exit code 1) and thus doesn't apply my theme.
Do you know why $base16_theme
is not set?
I don't see why it should be set in the first place. Shouldn't stylix handle that? Before said configuration no additional settings had to be applied to fish.
I feel like the base16 check is just a leftover remnant from the original fix a few years ago. In the case of stylix, $base16_theme isn't (or shouldn't) be used as a selector for a theme.
diff --git a/modules/fish/prompt.nix b/modules/fish/prompt.nix
index 800b5de..f379280 100644
--- a/modules/fish/prompt.nix
+++ b/modules/fish/prompt.nix
@@ -8,7 +8,7 @@ in ''
source ${theme}
# See https://github.com/tomyun/base16-fish/issues/7 for why this condition exists
- if test -n "$base16_theme" && status --is-interactive && test -z "$TMUX"
+ if status --is-interactive && test -z "$TMUX"
base16-${config.lib.stylix.colors.slug}
end
''
Oversight on my part. Thanks for catching this.