will133 / vim-dirdiff

Vim plugin to diff two directories
335 stars 59 forks source link

`!LANG=C diff` doesn't work under Windows cygwin #13

Closed ZSaberLv0 closed 6 years ago

ZSaberLv0 commented 7 years ago

with the default config, g:DirDiffForceLang would result these cmd:

:!LANG=C diff ...

which doesn't work under Windows cygwin, since LANG is not a valid command

workaround:

let g:DirDiffLangString = 'sh -c LANG=' . g:DirDiffForceLang . ' '
hcgraf commented 7 years ago

A similar problem occurs with the tcsh shell on unix. There, the workaround would be:

let g:DirDiffLangString = 'env LANG=' . g:DirDiffForceLang . ' '

Something more portable is probably needed here… With a few trials, I couldn't come up with something that works equally well under bash, tcsh and cygwin :(

will133 commented 6 years ago

I have a recent pull request that seems to fix this. Since I do not have a Windows box now it's somewhat hard to test. I'll close this for now.

ssoriche commented 5 years ago

I've had this same problem because I run fish as my shell. Explicitly setting let g:DirDiffLangString = 'env LANG=' . g:DirDiffForceLang . ' ' allowed me to use this plugin.