zellij: Add tests for additional options for shell integration

This commit is contained in:
David Chocholatý 2024-11-03 19:58:50 +01:00
parent 8b23b2955b
commit 994620a42f
No known key found for this signature in database
GPG key ID: 8FC8E68432148DCA

View file

@ -4,9 +4,18 @@
programs = {
zellij = {
enable = true;
enableBashIntegration = true;
enableShellCompletions = true;
autostartOnShellStart = {
enable = true;
attachExistingSession = true;
exitShellOnExit = true;
};
enableZshIntegration = true;
enableFishIntegration = true;
enableBashIntegration = true;
};
bash.enable = true;
zsh.enable = true;
@ -27,8 +36,14 @@
assertFileContains \
home-files/.bashrc \
'eval "$(@zellij@/bin/dummy setup --generate-auto-start bash)"'
assertFileContains \
home-files/.bashrc \
'eval "$(@zellij@/bin/dummy setup --generate-completion bash)"'
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
'source <(@zellij@/bin/dummy setup --generate-completion zsh |'
assertFileContains \
home-files/.zshrc \
'eval "$(@zellij@/bin/dummy setup --generate-auto-start zsh)"'
@ -37,5 +52,16 @@
assertFileContains \
home-files/.config/fish/config.fish \
'eval (@zellij@/bin/dummy setup --generate-auto-start fish | string collect)'
assertFileContains \
home-files/.config/fish/config.fish \
'eval (@zellij@/bin/dummy setup --generate-completion fish | string collect)'
assertFileExists home-path/etc/profile.d/hm-session-vars.sh
assertFileContains \
home-path/etc/profile.d/hm-session-vars.sh \
'export ZELLIJ_AUTO_ATTACH="true"'
assertFileContains \
home-path/etc/profile.d/hm-session-vars.sh \
'export ZELLIJ_AUTO_EXIT="true"'
'';
}