asyncrun.vim icon indicating copy to clipboard operation
asyncrun.vim copied to clipboard

error output when using commands proxied via WSL

Open ghost opened this issue 7 years ago • 5 comments

gvim 8.1 1-42 / windows10

I have wsl - ubuntu installed under windows10. Some ubuntu's commands are proxied to use in cmd by create .bat files and add them to PATH environment of windows10, patern like following:

@echo off
bash.exe -c "ls %*"

Then in cmd ls work as expected, log in bash, run ls in current directory.

Problem is that, asyncrun throws an error output when I try to run, for i.e: :AsyncRun ls

ghost avatar Jun 21 '18 08:06 ghost

you mean :AsyncRun ls or :AsyncRun bash -c ls ??

skywind3000 avatar Jun 21 '18 10:06 skywind3000

try my script: https://github.com/skywind3000/terminal

in this case, you can have:

:AsyncRun python terminal.py -m wslx ls -la

to run your wsl commands from vim.

If you have downloaded debian or ubuntu18.04 in windows store, you can start them by:

:AsyncRun python terminal.py -m wslx -p debian ls -la
:AsyncRun python terminal.py -m wslx -p ubuntu1804 ls -la

skywind3000 avatar Jun 21 '18 10:06 skywind3000

@skywind3000 : I use ubuntu so command would be AsyncRun python terminal.py -m wslx -p ubuntu ls -la. But I got the following error:

||   File "terminal.py", line 24
||     os.makedirs(folder, 0777)

ghost avatar Jun 21 '18 10:06 ghost

are you using vim on wsl ? Or on windows ?

The command is for windows vim only, not for vim on wsl.

skywind3000 avatar Jun 21 '18 14:06 skywind3000

I think I gave that info before: gvim 8.1 1-42 / windows10

:AsyncRun python terminal.py -m wslx -p ubuntu ls -la is executed under gvim / windows10

ghost avatar Jun 22 '18 01:06 ghost