mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 13:39:46 +01:00
28 lines
516 B
Nix
28 lines
516 B
Nix
|
{ ... }:
|
||
|
|
||
|
let
|
||
|
shellIntegration = ''
|
||
|
function ya
|
||
|
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
||
|
yazi --cwd-file="$tmp"
|
||
|
if set cwd (cat -- "$tmp") && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]
|
||
|
cd -- "$cwd"
|
||
|
end
|
||
|
rm -f -- "$tmp"
|
||
|
end
|
||
|
'';
|
||
|
in {
|
||
|
programs.fish.enable = true;
|
||
|
|
||
|
programs.yazi = {
|
||
|
enable = true;
|
||
|
enableFishIntegration = true;
|
||
|
};
|
||
|
|
||
|
test.stubs.yazi = { };
|
||
|
|
||
|
nmt.script = ''
|
||
|
assertFileContains home-files/.config/fish/config.fish '${shellIntegration}'
|
||
|
'';
|
||
|
}
|