1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-30 13:49:47 +01:00
home-manager/tests/modules/programs/starship/fish_with_transience.nix
Will Leinweber f06a43dca0
starship: add enable_transience for fish (#3975)
Starship has an advanced, experimental feature where fancy stuff in the
prompt can be replaced with something more simple after the command is
ran. This is very helpful for copy and pasting shell history somewhere
else.

docs: https://starship.rs/advanced-config/#transientprompt-and-transientrightprompt-in-fish

Fish is currently the only shell as far as I can tell that both
home-manager and starship support for this feature. Since the function
has to be called after starship is loaded, this seems like the best
place to put it.

format
2023-06-19 21:56:48 +02:00

21 lines
363 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs = {
fish.enable = true;
starship = {
enable = true;
enableTransience = true;
};
};
nmt.script = ''
assertFileExists home-files/.config/fish/config.fish
assertFileRegex home-files/.config/fish/config.fish 'enable_transience'
'';
};
}