Skip to content

include does not resolve ~ #2263

Closed Answered by twpayne
papanito asked this question in Q&A
Discussion options

You must be logged in to vote

The ~ character is a valid character in filenames. Many shells, however, do tilde expansion and interpret it as a shortcut for $HOME when interpreting the arguments to a command. Tilde expansion is the responsibility of the shell, not chezmoi. For more information, see #952.

The portable workaround is to use .chezmoi.homeDir, for example:

{{ include (joinPath .chezmoi.homeDir ".kube" "config.prd") }}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by papanito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants