neo-tree.nvim icon indicating copy to clipboard operation
neo-tree.nvim copied to clipboard

Fixed problems with shellslash

Open andreadev-it opened this issue 3 years ago • 3 comments

These changes should fix most of the issue about using shellslash on windows. However, maybe it's better to wait for this PR on plenary to be merged before accepting this. Without the changes on plenary, many things will just not work anyway.

andreadev-it avatar May 28 '22 13:05 andreadev-it

Found a problem: on linux the shellslash option is not disabled, it doesn't exists at all, and the code breaks. I'm making a change on that regard (using pcall to handle the eventual error), but I'm not sure how to update the PR.

andreadev-it avatar May 28 '22 14:05 andreadev-it

Tested on my linux laptop, that issue should be fixed now

andreadev-it avatar May 28 '22 15:05 andreadev-it

Hi @andreadev-it, thanks for submitting this PR. I'm OK with it as is, but I'm going to wait and see what happens on Plenary before merging. If it is accepted there and turned into a utility function, it might be better to just reuse that final Plenary implementation here instead of duplicating it.

cseickel avatar May 29 '22 13:05 cseickel

Hi @andreadev-it, it looks like the plenary one is stalled and I don't think it is relevant anymore because I have stopped using plenary for reading the filesystem.

Are you still interested in merging this?

I have to say, it seems like there should be more code changes/refactoring to make this work universally. I did a reference search for is_windows and came up with a lot of results with inconsistent methods of adjusting paths.

cseickel avatar Oct 17 '22 14:10 cseickel

Hi @cseickel , Sorry for being out of touch these days... From what I've experienced, enabling the shellslash option on windows causes way more harm than good, and I personally would not suggest it to anyone.
I agree that there might be the need to do more changes than these to allow the use of shellslash without generating issues. Actually, From what I've seen when I had shellslash enabled, even changing the code accordingly doesn't always work, since neovim also has a weird way of handling shellslash, IIRC.

Personally, I've stopped using shellslash, but if you think there might be the need to adjust it, I can look it up a little deeper and try to come up with a better fix

andreadev-it avatar Oct 31 '22 14:10 andreadev-it

No problem @andreadev-it. No one else has asked for shellslash related improvements, so if you are no longer using it then I will close this PR.

cseickel avatar Oct 31 '22 14:10 cseickel