abs icon indicating copy to clipboard operation
abs copied to clipboard

some helper functions for working with templates, a-la-helm (think of indent, quote, etc)

Open odino opened this issue 4 years ago • 1 comments

from @omissis

can you elaborate on what you think would be helpful?

odino avatar Jun 02 '21 10:06 odino

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.

omissis avatar Jun 07 '21 21:06 omissis