mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
flox format
This commit is contained in:
parent
276c25fab9
commit
1b2d2010b2
1 changed files with 10 additions and 7 deletions
|
|
@ -100,16 +100,19 @@ in
|
|||
disabled = false;
|
||||
};
|
||||
|
||||
# Using env_var module - Test 2: Extremely simple debug format
|
||||
env_var.flox = {
|
||||
variable = "FLOX_PROMPT_ENVIRONMENTS";
|
||||
format = "FLOX_IS:[$env_value] -- "; # Distinct debug format
|
||||
style = "green"; # Simple style
|
||||
disabled = false;
|
||||
# custom module that directly echoes the variable if found
|
||||
custom.flox_check = {
|
||||
description = "Direct Flox check";
|
||||
# Command explicitly checks and outputs, or outputs nothing.
|
||||
# Includes trailing space in the success case.
|
||||
command = ''if [ -n "$FLOX_PROMPT_ENVIRONMENTS" ]; then echo -n "via ❄️ $FLOX_PROMPT_ENVIRONMENTS "; else echo -n ""; fi'';
|
||||
# No 'when' clause.
|
||||
format = "$output";
|
||||
shell = ["bash" "-c"]; # Ensure it's run via bash -c
|
||||
};
|
||||
|
||||
# Main format string
|
||||
format = ''$directory $git_branch $conda$env_var_flox$nix_shell$cmd_duration$status$character'';
|
||||
format = ''$directory $git_branch $conda$custom.flox_check$nix_shell$cmd_duration$status$character'';
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue