twpayne / chezmoi

Manage your dotfiles across multiple diverse machines, securely.
https://www.chezmoi.io/
MIT License
13.4k stars 493 forks source link

Custom diff not working #1903

Closed sitiom closed 2 years ago

sitiom commented 2 years ago

Describe the bug

I'm getting an error similar to #1365 where adding delta as diff does not work.

To reproduce

  1. Put this on your config file
    [diff]
    command = "delta"
  2. chezmoi diff

Expected behavior

Delta should be used as the diff tool.

Output of command with the --debug flag

$ chezmoi --debug diff
2022-02-18T15:49:44+08:00 INF persistentPreRunRootE args=["C:\\ProgramData\\chocolatey\\lib\\chezmoi\\tools\\chezmoi.exe","--debug","diff"] goVersion=go1.17.7 version={"builtBy":"goreleaser","commit":"dd6fb
4f4bbea09a520015d602ec87214d309","date":"2022-02-18T01:35:41Z","version":"2.12.0-SNAPSHOT-dd6fbeca"}
2022-02-18T15:49:44+08:00 INF Stat component=system name=C:/Users/rycae/.config/chezmoi/chezmoistate.boltdb
2022-02-18T15:49:44+08:00 ERR Mkdir error="mkdir C:/Users/rycae/.config/chezmoi: Cannot create a file when that file already exists." component=system name=C:/Users/rycae/.config/chezmoi perm=511
2022-02-18T15:49:44+08:00 INF Stat component=system name=C:/Users/rycae/.config/chezmoi
2022-02-18T15:49:44+08:00 INF Stat component=system name=C:/Users/rycae/.local/share/chezmoi/.git
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="chezmoi\r\n" name=C:/Users/rycae/.local/share/chezmoi/.chezmoiroot size=9
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.json.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.loc
hare/chezmoi/chezmoi/.chezmoi.json.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.toml.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.loc
hare/chezmoi/chezmoi/.chezmoi.toml.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.yaml.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.loc
hare/chezmoi/chezmoi/.chezmoi.yaml.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.yml.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.loca
are/chezmoi/chezmoi/.chezmoi.yml.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.properties.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/ryca
ocal/share/chezmoi/chezmoi/.chezmoi.properties.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.props.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.lo
share/chezmoi/chezmoi/.chezmoi.props.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.prop.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.loc
hare/chezmoi/chezmoi/.chezmoi.prop.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.hcl.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.loca
are/chezmoi/chezmoi/.chezmoi.hcl.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.tfvars.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.l
/share/chezmoi/chezmoi/.chezmoi.tfvars.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.dotenv.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.l
/share/chezmoi/chezmoi/.chezmoi.dotenv.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.env.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.loca
are/chezmoi/chezmoi/.chezmoi.env.tmpl size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoi.ini.tmpl: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.loca
are/chezmoi/chezmoi/.chezmoi.ini.tmpl size=0
2022-02-18T15:49:44+08:00 INF Get bucket=configState component=persistentState key=configState value=
2022-02-18T15:49:44+08:00 ERR ReadFile error="open C:/Users/rycae/.local/share/chezmoi/.chezmoiversion: The system cannot find the file specified." component=system data= name=C:/Users/rycae/.local/share/ch
i/.chezmoiversion size=0
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="chezmoi\r\n" name=C:/Users/rycae/.local/share/chezmoi/.chezmoiroot size=9
2022-02-18T15:49:44+08:00 INF Stat component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi
2022-02-18T15:49:44+08:00 INF Stat component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="[diff]\r\n    command = \"delta\"\r\n[merge]\r\n    command = \"nvim\"\r\n  ..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoidata.t
size=137
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/nvim
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/lf
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/PowerShell
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/VSCodium
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/nvim/lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Basic Settings\nset hidden off\nset incsearch on\nset drawbox tru..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/lf/lf
ize=149
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/PowerShell/Scripts
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Environment Variables\n$env:EDITOR = \"nvim\"\n$env:SHELL = \"pwsh ..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/Pow
ell/Microsoft.PowerShell_environment.ps1 size=2871
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{\r\n  \"extensionsGallery\": {\r\n    \"serviceUrl\": \"https://marketpl..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates
odium/product.json size=303
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="hostname: \"dotfiles\"\nprofile: main\nrepository:\n  type: file\n  pa..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/VS
um/zokugun.sync-settings.yml size=100
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/PowerShell/Completions
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Environment Variables\n& $PSScriptRoot\\Microsoft.PowerShell_env..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/PowerS
/Microsoft.PowerShell_profile.ps1 size=1869
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/nvim/lua/custom
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="$ChocolateyProfile = \"$env:ChocolateyInstall\\helpers\\chocolateyP..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/Power
l/Completions/choco.ps1 size=160
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Change working dir in powershell to last dir in lf on exit.\n#\n..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/PowerS
/Scripts/lfcd.ps1 size=415
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/nvim/lua/custom/plugins
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# PowerShell parameter completion shim for the dotnet CLI\r\nRegis..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/PowerS
/Completions/dotnet.ps1 size=387
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Autocompletion for powershell.\r\n#\r\n# You need to either copy t..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/Powe
ll/Completions/lf.ps1 size=1763
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="--[[\r\n\r\n██\u2001███\u2001   ██\u2001██\u2001████��..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/nvim/lua/custom/in
ua size=892
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="local M = {}\r\n\r\nlocal userPlugins = require \"custom.plugins\"\r\n\r\n..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplate
im/lua/custom/chadrc.lua size=2121
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/nvim/lua/custom/plugins/configs
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="gh completion -s powershell | Join-String {\r\n    $_ -replace \" '..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/Power
l/Completions/gh.ps1 size=241
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="vim.o.guifont = 'Delugia Nerd Font:h10'\r\nvim.wo.list = true\r\nloc..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/nvim
/custom/options.lua size=192
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="-- Autogroups\r\nvim.cmd \"au TextYankPost * silent! lua vim.highli..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/nvim/
custom/autocmds.lua size=80
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="if vim.fn.has('win32') == 1 then\r\n  vim.o.shell = 'pwsh'\r\n  vim...." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/nvim
/custom/shell.lua size=435
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="return {\r\n   \"jeffkreeftmeijer/vim-numbertoggle\",\r\n   {\r\n     \"k..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates
m/lua/custom/plugins/init.lua size=2862
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="local map = require(\"core.utils\").map\r\n\r\nmap(\"n\", \"<leader>fz\", ..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplate
im/lua/custom/mappings.lua size=95
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="local map = require(\"core.utils\").map\r\n\r\nlocal M = {}\r\n\r\nM.setup..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplate
im/lua/custom/plugins/configs/nvim-hlslens.lua size=634
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="vim.g.firenvim_config = {\r\n  localSettings = {\r\n    [\".*\"] = {\r\n..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/
/lua/custom/plugins/configs/firenvim.lua size=105
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="local M = {}\r\n\r\nM.setup_lsp = function(attach, capabilities)\r\n  ..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/nv
ua/custom/plugins/configs/lspconfig.lua size=440
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="local null_ls = require \"null-ls\"\r\nlocal b = null_ls.builtins\r\n\r..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoitemplates/n
lua/custom/plugins/configs/null-ls.lua size=342
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{ if ne .chezmoi.os \"windows\" }}\r\nAppData/\r\nDocuments/PowerShel..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/.chezmoiignore size=
2022-02-18T15:49:44+08:00 ERR ReadFile error="open /etc/os-release: The system cannot find the path specified." component=system data= name=/etc/os-release size=0
2022-02-18T15:49:44+08:00 ERR ReadFile error="open /usr/lib/os-release: The system cannot find the path specified." component=system data= name=/usr/lib/os-release size=0
2022-02-18T15:49:44+08:00 INF chezmoi.OSRelease error="file does not exist"
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/lf
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/custom
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/custom/plugins
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/custom/plugins/configs
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Roaming
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Roaming/VSCodium
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Roaming/VSCodium/User
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Roaming/VSCodium/User/globalStorage
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Roaming/VSCodium/User/globalStorage/zokugun.sync-settings
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents/PowerShell
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents/PowerShell/Completions
2022-02-18T15:49:44+08:00 INF ReadDir component=system name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents/PowerShell/Scripts
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="[user]\n\temail = sitiom@disroot.org\n\tname = Ryan Caezar Itang\n\tsi..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/dot_gitconfig size=5
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/.gitconfig
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="[user]\n\temail = sitiom@disroot.org\n\tname = Ryan Caezar Itang\n\tsi..." name=C:/Users/rycae/.gitconfig size=536
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/lf
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"lf/lfrc\" . -}}\nset smartcase on\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/lf/lfrc.tmpl size=46
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/lf/lfrc
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Basic Settings\nset hidden off\nset incsearch on\nset drawbox tru..." name=C:/Users/rycae/AppData/Local/lf/lfrc size=149
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/lf/lfrc
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Basic Settings\nset hidden off\nset incsearch on\nset drawbox tru..." name=C:/Users/rycae/AppData/Local/lf/lfrc size=149
2022-02-18T15:49:44+08:00 INF Set bucket=entryState component=persistentState key=C:/Users/rycae/AppData/Local/lf/lfrc value="{\n  \"type\": \"file\",\n  \"mode\": 438,\n  \"contentsSHA256\": \"fdb6e2d5ca1c
1fb2f7b1d5eef564c6ffe4e7d69d8a8b2dc6dd45c4403890\"\n}\n"
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/autocmds.lua\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/custom/auto
.lua.tmpl size=53
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/autocmds.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="-- Autogroups\r\nvim.cmd \"au TextYankPost * silent! lua vim.highli..." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/autocmds.lua size=80
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/chadrc.lua\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/custom/chadrc
.tmpl size=51
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/chadrc.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="local M = {}\r\n\r\nlocal userPlugins = require \"custom.plugins\"\r\n\r\n..." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/chadrc.lua size
1
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/init.lua\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/custom/init.lua
l size=49
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/init.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="--[[\r\n\r\n██\u2001███\u2001   ██\u2001██\u2001████��..." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/init.lua size=892
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/mappings.lua\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/custom/mapp
.lua.tmpl size=53
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/mappings.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="local map = require(\"core.utils\").map\r\n\r\nmap(\"n\", \"<leader>fz\", ..." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/mappings.lua si
5
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/options.lua\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/custom/optio
ua.tmpl size=52
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/options.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="vim.o.guifont = 'Delugia Nerd Font:h10'\r\nvim.wo.list = true\r\nloc..." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/options.lua size=192
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/configs
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/plugins/configs/firenvim.lua\" . -}..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/c
m/plugins/configs/firenvim.lua.tmpl size=69
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/configs/firenvim.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="vim.g.firenvim_config = {\r\n  localSettings = {\r\n    [\".*\"] = {\r\n..." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/configs/f
vim.lua size=105
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/plugins/configs/lspconfig.lua\" . -..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/c
m/plugins/configs/lspconfig.lua.tmpl size=70
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/configs/lspconfig.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="local M = {}\r\n\r\nM.setup_lsp = function(attach, capabilities)\r\n  ..." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/configs/lsp
ig.lua size=440
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/plugins/configs/null-ls.lua\" . -}}..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/c
m/plugins/configs/null-ls.lua.tmpl size=68
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/configs/null-ls.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="local null_ls = require \"null-ls\"\r\nlocal b = null_ls.builtins\r\n\r..." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/configs/nu
s.lua size=342
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/plugins/configs/nvim-hlslens.lua\" ..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/c
m/plugins/configs/nvim-hlslens.lua.tmpl size=73
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/configs/nvim-hlslens.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="local map = require(\"core.utils\").map\r\n\r\nlocal M = {}\r\n\r\nM.setup..." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/configs
m-hlslens.lua size=634
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/plugins/init.lua\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/custom/
ins/init.lua.tmpl size=57
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/init.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="return {\r\n   \"jeffkreeftmeijer/vim-numbertoggle\",\r\n   {\r\n     \"k..." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/plugins/init.lua
e=2862
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"nvim/lua/custom/shell.lua\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Local/nvim/lua/custom/shell.l
mpl size=50
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Local/nvim/lua/custom/shell.lua
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="if vim.fn.has('win32') == 1 then\r\n  vim.o.shell = 'pwsh'\r\n  vim...." name=C:/Users/rycae/AppData/Local/nvim/lua/custom/shell.lua size=435       2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Roaming
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Roaming/VSCodium
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Roaming/VSCodium/User
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Roaming/VSCodium/User/globalStorage
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Roaming/VSCodium/User/globalStorage/zokugun.sync-settings
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"VSCodium/zokugun.sync-settings.yml\" . -}}\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Roaming/VSCodium/User/globalStorage/zokugun.sync-settings/settings.yml.tmpl size=56
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Roaming/VSCodium/User/globalStorage/zokugun.sync-settings/settings.yml
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="hostname: \"dotfiles\"\nprofile: main\nrepository:\n  type: file\n  pa..." name=C:/Users/rycae/AppData/Roaming/VSCodium/User/globalStorage/zokugun.sync-settings/settings.yml size=100
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"VSCodium/product.json\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/AppData/Roaming/VSCodium/product.json.tmpl size=46
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/AppData/Roaming/VSCodium/product.json
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{\r\n  \"extensionsGallery\": {\r\n    \"serviceUrl\": \"https://marketpl..." name=C:/Users/rycae/AppData/Roaming/VSCodium/product.json size=303    2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents/PowerShell
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents/PowerShell/Completions
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"PowerShell/Completions/choco.ps1\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents/PowerShell/Completions/choco.ps1.tmpl size=57
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents/PowerShell/Completions/choco.ps1
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="$ChocolateyProfile = \"$env:ChocolateyInstall\\helpers\\chocolateyP..." name=C:/Users/rycae/Documents/PowerShell/Completions/choco.ps1 size=160     2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"PowerShell/Completions/dotnet.ps1\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents/PowerShell/Completions/dotnet.ps1.tmpl size=58
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents/PowerShell/Completions/dotnet.ps1
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# PowerShell parameter completion shim for the dotnet CLI\r\nRegis..." name=C:/Users/rycae/Documents/PowerShell/Completions/dotnet.ps1 size=387     2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"PowerShell/Completions/gh.ps1\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents/PowerShell/Completions/gh.ps1.tmpl size=54
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents/PowerShell/Completions/gh.ps1
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="gh completion -s powershell | Join-String {\r\n    $_ -replace \" '..." name=C:/Users/rycae/Documents/PowerShell/Completions/gh.ps1 size=241        2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"PowerShell/Completions/lf.ps1\" . -}}\r\n\r\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents/PowerShell/Completions/lf.ps1.tmpl size=54
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents/PowerShell/Completions/lf.ps1
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Autocompletion for powershell.\r\n#\r\n# You need to either copy t..." name=C:/Users/rycae/Documents/PowerShell/Completions/lf.ps1 size=1763      2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"PowerShell/Microsoft.PowerShell_environment.ps1\" ...." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents/PowerShell/Microsoft.PowerShell_environment.ps1.tmpl size=69
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents/PowerShell/Microsoft.PowerShell_environment.ps1
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Environment Variables\n$env:EDITOR = \"nvim\"\n$env:SHELL = \"pwsh ..." name=C:/Users/rycae/Documents/PowerShell/Microsoft.PowerShell_environment.ps1 size=2871
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"PowerShell/Microsoft.PowerShell_profile.ps1\" . -}}..." name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl size=65
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents/PowerShell/Microsoft.PowerShell_profile.ps1
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Environment Variables\n& $PSScriptRoot\\Microsoft.PowerShell_env..." name=C:/Users/rycae/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 size=1869
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents/PowerShell/Scripts
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="{{- template \"PowerShell/Scripts/lfcd.ps1\" . -}}\n\n" name=C:/Users/rycae/.local/share/chezmoi/chezmoi/Documents/PowerShell/Scripts/lfcd.ps1.tmpl size=50
2022-02-18T15:49:44+08:00 INF Lstat component=system name=C:/Users/rycae/Documents/PowerShell/Scripts/lfcd.ps1
2022-02-18T15:49:44+08:00 INF ReadFile component=system data="# Change working dir in powershell to last dir in lf on exit.\n#\n..." name=C:/Users/rycae/Documents/PowerShell/Scripts/lfcd.ps1 size=415
2022-02-18T15:49:48+08:00 INF Close component=persistentState

Output of chezmoi doctor

```console $ chezmoi doctor RESULT CHECK MESSAGE ok version v2.12.0-SNAPSHOT-dd6fbeca, commit dd6fbeca74f4bbea09a520015d602ec87214d309, built at 2022-02-18T01:35:41Z, built by goreleaser ok os-arch windows/amd64 ok systeminfo Microsoft Windows 11 Pro (10.0.22000 N/A Build 22000) ok go-version go1.17.7 (gc) ok executable C:/ProgramData/chocolatey/lib/chezmoi/tools/chezmoi.exe ok config-file no config file found ok source-dir ~/.local/share/chezmoi is a directory ok suspicious-entries no suspicious entries ok working-tree ~/.local/share/chezmoi is a directory ok dest-dir ~ is a directory ok shell found C:/Program Files/PowerShell/7/pwsh.exe ok edit-command found C:/tools/neovim/Neovim/bin/nvim.exe ok git-command found C:/Program Files/Git/cmd/git.exe, version 2.35.1 ok merge-command found C:/Windows/vimdiff.bat info age-command age not found in $PATH ok gpg-command found C:/Program Files (x86)/GnuPG/bin/gpg.exe, version 2.3.4 info pinentry-command not set info 1password-command op not found in $PATH info bitwarden-command bw not found in $PATH info gopass-command gopass not found in $PATH info keepassxc-command keepassxc-cli not found in $PATH info keepassxc-db not set info lastpass-command lpass not found in $PATH info pass-command pass not found in $PATH info vault-command vault not found in $PATH info secret-command not set ```

Additional context

twpayne commented 2 years ago

Is there any actual diff to display? What's the output of chezmoi status?

sitiom commented 2 years ago

Is there any actual diff to display?

Yes there is. It just uses the normal bat pager that I use.

$ chezmoi status
 M AppData/Local/lf/lfrc
twpayne commented 2 years ago

I'm not sure why this isn't working as expected. I would expect to see at least delta run as a command in the output of chezmoi diff --debug, but the only mention is of the config file.

I tried to duplicate this locally but in all my tests on Windows the custom diff command was invoked correctly.

Could you try running this with the latest master branch (which includes #1904)?

If you set diff.command to echo or cat (or whatever the Windows equivalent of these commands is), and re-run the command, what happens?

If you remove -NoLogo from your $SHELL environment variable, and re-run the command, what happens?

sitiom commented 2 years ago

Could you try running this with the latest master branch (which includes #1904)?

Same thing.

If you set diff.command to echo or cat (or whatever the Windows equivalent of these commands is), and re-run the command, what happens?

Setting diff.command to those values or any nonsensical value still opens my pager. Looks like my config is ignored.

If you remove -NoLogo from your $SHELL environment variable, and re-run the command, what happens?

Same thing.

sitiom commented 2 years ago

Setting it in .config/chezmoi/chezmoi.toml seems to work, but I would not like to put that there. So the issue is that .chezmoidata.toml is somehow being ignored.

twpayne commented 2 years ago

Setting it in .config/chezmoi/chezmoi.toml seems to work, but I would not like to put that there. So the issue is that .chezmoidata.toml is somehow being ignored.

Ah, so this is where the problem comes from. The custom diff command has to be set in chezmoi's config file. .chezmoidata.toml contains template data, not chezmoi's config. To create ~/.config/chezmoi/chezmoi.toml on a new machine automatically, see this entry in the user guide.

I think we can close this issue now, please re-open if needed.

sitiom commented 2 years ago

Ah, that clarifies things. Thanks for your help!