Skip to content

Commit

Permalink
docs: Add note on setting .ps1 interpreter to pwsh
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenhilton authored and twpayne committed Oct 20, 2022
1 parent 7f8fd8a commit 5e14f9a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions assets/chezmoi.io/docs/reference/target-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,17 @@ Script interpreters can be added or overridden with the
command = "tclsh"
```

!!! note

If you intend to use PowerShell Core (`pwsh.exe`) as the `.ps1`
interpreter, include the following in your config file:

```toml title="~/.confg/chezmoi/chezmoi.toml"
[interpreters.ps1]
command = "pwsh"
args = ["-NoLogo"]
```

If the script in the source state is a template (with a `.tmpl` extension), then
chezmoi will strip the `.tmpl` extension and use the next remaining extension to
determine the interpreter to use.
Expand Down

0 comments on commit 5e14f9a

Please sign in to comment.