lambdalisue / vim-suda

🥪 An alternative sudo.vim for Vim and Neovim, limited support sudo in Windows
MIT License
725 stars 29 forks source link

suda doesn't work in nvim in nixos #41

Closed tex closed 3 years ago

tex commented 3 years ago

nvim_nixos_suda_error

It used to work, but now it is not. No idea what has changed. Any ideas what to try?

zeertzjq commented 3 years ago

This seems to be a problem with shellescape(). I guess you are using xonsh. Does this problem still occur if you :set shell=/bin/sh?

tex commented 3 years ago

Bingo! Thanks @zeertzjq. And I am very sorry I forget to tell about xonsh. Yes I am using it. I didn't realized it gets propagated into what nvim uses internally.

tex commented 3 years ago

And yes, after setting shell to sh the problem goes away and suda works as expected.

tex commented 3 years ago

Feel free to close this issue if you think suda does not need any change. I am fine with adding the shell setting into my config. Guess it won't have any other side issues.