Skip to content

Commit 2f05cd3

Browse files
committed
Fix: Docs in "User guide -> tools -> merge -> use vscode as the merge tool" don't work for paths with spaces in them
1 parent 35b22c8 commit 2f05cd3

File tree

1 file changed

+2
-2
lines changed
  • assets/chezmoi.io/docs/user-guide/tools

1 file changed

+2
-2
lines changed

assets/chezmoi.io/docs/user-guide/tools/merge.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ To use [VSCode][vscode] as the merge tool, add the following to your config:
6767
command = "bash"
6868
args = [
6969
"-c",
70-
"cp {{ .Target }} {{ .Target }}.base && code --new-window --wait --merge {{ .Destination }} {{ .Target }} {{ .Target }}.base {{ .Source }}",
70+
"cp \"{{ .Target }}\" \"{{ .Target }}.base\" && code --new-window --wait --merge \"{{ .Destination }}\" \"{{ .Target }}\" \"{{ .Target }}.base\" \"{{ .Source }}\"",
7171
]
7272
```
7373

@@ -78,7 +78,7 @@ To use [VSCode][vscode] as the merge tool, add the following to your config:
7878
command: "bash"
7979
args:
8080
- "-c"
81-
- "cp {{ .Target }} {{ .Target }}.base && code --new-window --wait --merge {{ .Destination }} {{ .Target }} {{ .Target }}.base {{ .Source }}"
81+
- "cp \"{{ .Target }}\" \"{{ .Target }}.base\" && code --new-window --wait --merge \"{{ .Destination }}\" \"{{ .Target }}\" \"{{ .Target }}.base\" \"{{ .Source }}\""
8282
```
8383

8484
[bcomp]: https://www.scootersoftware.com/

0 commit comments

Comments
 (0)