-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can this plugin surpport for Windows platform? #82
Comments
Thank you for your explaining the situation in detail. This issue likely stems from the pattern = { home .. '/.local/share/chezmoi/*' } The Please try modifying your pattern = { home:gsub('\\', '/') .. '/.local/share/chezmoi/*' }
-- for more strictly:
pattern = { vim.fn.escape(home:gsub('\\', '/') .. '/.local/share/chezmoi/*', '.~$[ ') } I hope this helps you. Plus, thank you for informing me about the |
I don't know whether the new error affect most function of chezmoi. |
Hmm... Would removing the brackets ( -- pattern = { vim.fn.escape(home:gsub('\\', '/') .. '/.local/share/chezmoi/*', '.~$[ ') },
pattern = vim.fn.escape(home:gsub('\\', '/') .. '/.local/share/chezmoi/*', '.~$[ '), Surrounding a value with brackets creates a list in Oh, |
The init = function()
vim.g["chezmoi#use_tmp_dir"] = 1
vim.g["chezmoi#source_dir_path"] = home .. '/.local/share/chezmoi'
print(vim.g["chezmoi#source_dir_path"])
end, |
ok, I got it. I have fixed it in my local. Could I give a PR to your repo? |
Excuse me but ... |
You shouldn't need to submit a PR. Thank you. You should not need to modify if os.getenv("HOME") == nil then
-- with Vim API
vim.fn.setenv("HOME", vim.fn.expand("~"))
-- or Neovim API
vim.fn.setenv("HOME", vim.env.HOMEDRIVE .. vim.env.HOMEPATH)
-- or pure Lua
vim.fn.setenv("HOME", os.getenv("HOMEDRIVE") .. os.getenv("HOMEPATH"))
end |
You may need to replace backslashes ( if os.getenv("HOME") == nil then
-- with Vim API
local home = vim.fn.expand("~")
-- or Neovim API
local home = vim.env.HOMEDRIVE .. vim.env.HOMEPATH
-- or pure Lua
local home = os.getenv("HOMEDRIVE") .. os.getenv("HOMEPATH")
vim.fn.setenv("HOME", home:gsub("\\", "/"))
end |
As you see, I found that env variable always be nil on windows ,so I change the line to make it has a right value.
local home = (os.getenv("HOME") ~= nil and {os.getenv("HOME")} or {os.getenv("Homepath")})[1]
But finally, it still process failed at the below line:
My home dir is zimiq.
So I think the Unknown operator may be related to /zimiq's /zi
I have no way to detect it futher. Hope you can give me some help.
The text was updated successfully, but these errors were encountered: