starship: add enableInteractive option for fish

Some fish plugins such as https://github.com/acomagu/fish-async-prompt
require that starship be initialized as non-interactive.

When the `programs.starship.enableInteractive` option is enabled,
starship is initialized at the end of the init script, outside the
interactive block.
This commit is contained in:
eljamm 2024-07-24 11:48:42 +01:00 committed by Robert Helgesson
parent 1cd17a2f76
commit 86ee1290d7
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
5 changed files with 100 additions and 1 deletions

View file

@ -1847,6 +1847,20 @@ in {
output.
'';
}
{
time = "2024-12-04T20:00:00+00:00";
condition = let
sCfg = config.programs.starship;
fCfg = config.programs.fish;
in sCfg.enable && sCfg.enableFishIntegration && fCfg.enable;
message = ''
A new option 'programs.starship.enableInteractive' is available for
the Fish shell that only enables starship if the shell is interactive.
Some plugins require this to be set to 'false' to function correctly.
'';
}
];
};
}