lambdalisue / vim-suda

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

Error writing input to shell-command: EPIPE #5

Open BurhanDanger opened 6 years ago

BurhanDanger commented 6 years ago
:W                                                Error detected while processing function suda#BufWriteCmd[3]..suda#write[18]..suda#system:
line    5:
E5677: Error writing input to shell-command: EPIPE
Press ENTER or type command to continue

Steps to reproduce: my /etc/hosts . Delete the very last line.

lambdalisue commented 6 years ago

Got it but a bit difficult to fix.

thiswillbeyourgithub commented 4 years ago

Is it not fixed ? suda doesn't seem functionnal to me for the same reason

lambdalisue commented 4 years ago

Unfortunately.

The link above has broken but it was because of the size of the file. I've no idea how to fix this in a plugin level.

thiswillbeyourgithub commented 4 years ago

Oh indeed I was trying this with my huuuge hosts file. It seems to be working fine with smaller files.

Maybe you should ask for help there : https://github.com/neovim/neovim/issues/8217, this is where I heard about this project

In the meantime, if you have time maybe you could try to find the size at which the bug is happenning ? Maybe also display a warning when the file size is too big and the file is uneditable ? Just my 2cts :)

Great addon anyway, have a nice day

zeertzjq commented 3 years ago

I guess PR #35 can solve this problem. If #35 is merged, the full content of the file is no longer required to be sent through a pipe. (For Unix-like operating systems only)

aarondill commented 6 months ago

is this fixed? #35 was merged