[Question] Conditionally set file extension? #3963
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
This comment was marked as off-topic.
This comment was marked as off-topic.
-
No, there is not. There are a few options available to you:
|
Beta Was this translation helpful? Give feedback.
No, there is not.
There are a few options available to you:
Scripts can be ignored in
.chezmoiignore.tmpl
just as they do to other files (see twpayne/dotfiles/home/.chezmoiignore.tmpl (this prevents the Windows one from running on Linux, but does not unify the scripts).A version of bash can be installed on Windows (this can potentially unify the scripts).
A version of PowerShell can be installed on Linux (this can potentially unify the scripts).
Your script can be written in a different common language (Ruby, Python, Tcl, whatever) with the appropriate interpreter installed (unifying the scripts).
You can always call the file
.ps1.tmpl
but do something like: