abs
abs copied to clipboard
some helper functions for working with templates, a-la-helm (think of indent, quote, etc)
from @omissis
can you elaborate on what you think would be helpful?
Sure! This idea follows up on https://github.com/abs-lang/abs/issues/436 and introduces some functions to deal with values and placeholders, so that the example template at issue #436 could become something like the following one:
Unattended-Upgrade::Allowed-Origins {
{{range .origins}}
{{.origin | nindent 8}}
{{end}}
};
Unattended-Upgrade::Package-Blacklist {
};
Unattended-Upgrade::DevRelease "auto";
Unattended-Upgrade::Mail {{ .email | quote }};
Unattended-Upgrade::MailReport "on-change";
Unattended-Upgrade::Automatic-Reboot "false";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
See Helm's function list to get a better idea of the supported functionalities.