Render templates

pimp template system is based on Go template system. There are no fundamental differences between them. The following piece of code behaves as you would expect:

{{- /* template.tmpl */ -}}

Git branches in {{pwd}}:
{{- range GitBranches}}
  * {{.}}
{{- end}}

Note the use of the GitBranches function. Refer to the template functions documentation to learn more about all the functions available.

You can use pimp --eval 'funcs | toPrettyJSON' to list all the functions available when rendering a template.

Read more about the Template Engine in the documentation.

Next, let's see how you can run scripts with Pimp.

Last updated