Files
home-manager/tests/modules/programs/tere/default-package.nix
Nicolai Weitkemper (with AI) 59203fe214 tere: add module
Adds programs.tere, which installs tere and sets up the shell wrapper
it needs to change the current directory on exit, for Bash, Zsh, Fish
and Nushell.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 10:01:21 -06:00

28 lines
641 B
Nix

{ config, ... }:
{
programs.bash.enable = true;
programs.tere = {
enable = true;
package = config.lib.test.mkStubPackage {
name = "tere";
buildScript = ''
mkdir -p $out/bin
touch $out/bin/tere
chmod +x $out/bin/tere
'';
};
enableBashIntegration = true;
};
nmt.script = ''
assertFileExists home-path/bin/tere
assertFileExists home-files/.bashrc
assertFileContains home-files/.bashrc 'tere() {'
assertFileContains home-files/.bashrc 'local result=$(command tere "$@")'
assertFileContains home-files/.bashrc '[ -n "$result" ] && cd -- "$result"'
'';
}