Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide .chezmoi.script context for templated scripts #3625

Open
bradenhilton opened this issue Mar 3, 2024 · 0 comments
Open

Provide .chezmoi.script context for templated scripts #3625

bradenhilton opened this issue Mar 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@bradenhilton
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

#3618 (comment)

Describe the solution you'd like

Provide the state (either the latest entry or a reverse-chronological list of all entries) of the current templated script from the scriptState.

Examples:

{{ .chezmoi.script.runAt }} # if latest-only
{{ (index .chezmoi.script 0).runAt }} # if list

runAt specifically should be compatible with other date/time functions, if possible.

Describe alternatives you've considered

N/A

Additional context

N/A

@bradenhilton bradenhilton added the enhancement New feature or request label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant