mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-03 07:31:03 +01:00
Add test to verify intelligent width optimization of shell arrays. The test demonstrates how formatShellArrayContent packs multiple items per line within reasonable width limits rather than one item per line. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{
|
|
programs.zsh = {
|
|
enable = true;
|
|
# Add many setOptions to trigger multi-line formatting
|
|
setOptions = [
|
|
"AUTO_LIST"
|
|
"AUTO_PARAM_SLASH"
|
|
"AUTO_PUSHD"
|
|
"ALWAYS_TO_END"
|
|
"CORRECT"
|
|
"HIST_FCNTL_LOCK"
|
|
"HIST_VERIFY"
|
|
"INTERACTIVE_COMMENTS"
|
|
"MENU_COMPLETE"
|
|
"PUSHD_IGNORE_DUPS"
|
|
"PUSHD_TO_HOME"
|
|
"PUSHD_SILENT"
|
|
"NOTIFY"
|
|
"PROMPT_SUBST"
|
|
"MULTIOS"
|
|
"NOFLOWCONTROL"
|
|
"NO_CORRECT_ALL"
|
|
"NO_HIST_BEEP"
|
|
"NO_NOMATCH"
|
|
];
|
|
# This should also show intelligent formatting for history options
|
|
history = {
|
|
size = 50000;
|
|
save = 50000;
|
|
# These will create many disabled options
|
|
append = false;
|
|
ignoreDups = false;
|
|
ignoreAllDups = false;
|
|
saveNoDups = false;
|
|
findNoDups = false;
|
|
ignoreSpace = false;
|
|
expireDuplicatesFirst = false;
|
|
extended = false;
|
|
share = false;
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.zshrc
|
|
assertFileContent home-files/.zshrc ${./smart-formatting-expected.zshrc}
|
|
'';
|
|
}
|