fish: expose session variables package
This allows fish users to source the `hm-session-vars.fish` if they are not using the generated `config.fish` (which now sources the same file).
This commit is contained in:
parent
46c9af8a92
commit
af7f14ddf7
4 changed files with 46 additions and 6 deletions
|
|
@ -7,4 +7,5 @@
|
|||
fish-plugins = ./plugins.nix;
|
||||
fish-manpage = ./manpage.nix;
|
||||
fish-binds = ./binds.nix;
|
||||
fish-session-variables = ./session-variables.nix;
|
||||
}
|
||||
|
|
|
|||
20
tests/modules/programs/fish/session-variables.nix
Normal file
20
tests/modules/programs/fish/session-variables.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
home.sessionVariables = {
|
||||
V1 = "v1";
|
||||
V2 = "v2-${config.home.sessionVariables.V1}";
|
||||
};
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-path/etc/profile.d/hm-session-vars.fish
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.fish \
|
||||
"set -gx V1 'v1'"
|
||||
assertFileRegex home-path/etc/profile.d/hm-session-vars.fish \
|
||||
"set -gx V1 'v1'"
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue