Closed mhalano closed 3 years ago
I found what is wrong, I just don't know how to fix it. The problem is related to Snap. If I use the Chezmoi with a regular package, it works as expected.
Here is the debug log when I execute forcing the use of Snap (snap run chezmoi edit ...
):
Executable exists
Getting parent pid
Getting parent pid cmd args
Parent args: /snap/chezmoi/233/chezmoi edit /home/mhalano/.config/nvim/init.vim
['/snap/chezmoi/233/chezmoi', 'edit', '/home/mhalano/.config/nvim/init.vim']
Chezmoi edit command not found on parent process. It's probably not a chezmoi invoke.
Press ENTER or type command to continue
Hey @mhalano! Thanks for using my plugin. I haven't really touched the code for this in a while. So I had a quick look. I think, to make the if work, in this case, maybe we need to run a basename
of l:parentPidFileSplitted[0]
if it contains a slash in the beginning.
Do you think you are up for a challenge and send a PR?
Can you try this branch? Plug 'Lilja/vim-chezmoi', { 'branch': 'contains-chezmoi-executable' }
@Lilja Just made a pull request.
Your solution seems fine. I think is even better than mine. :100:
Thanks for your PR, I think that mine makes a tiny bit more sense when I thought about it a second time. I hope this PR solves your issue with those pesky absolute paths!
I'm trying to use vim-chezmoi with vim-plug and Neovim but doesn't seem working.
I have in my Neovim this config:
I'm checking if work monitoring a file (with watch) and changing it in another tab with
chezmoi edit <file>
. The idea is after I save with:w
the watch should show the change I made.The plugin was installed with
:PlugInstall
.Am I doing anything wrong?