Back to Chezmoi

`comment` *prefix* *text*

assets/chezmoi.io/docs/reference/templates/functions/comment.md

2.70.2399 B
Original Source

comment prefix text

comment returns text with each line prefixed with prefix.

comment is typically used to comment out blocks of multi-line text unconditionally. In contrast, the ensureLinePrefix template function can be used to only comment out lines that are not already comments.

!!! example

```
{{ "Line 1\nLine 2\n" | comment "# " }}
```