Tuesday, February 1, 2022

Use wsl's bash as shell on Windows 10

Hi!

I am trying to set up bash as my default shell for vim. However I am not able to get it to work. This is the current setup which allows for commands without arguments to be executed:
if has('win32')
        set shell=bash
        set shellpipe=|
        set shellredir=>
        set shellcmdflag=-c
endif
For example, !ls executes as expected and prints the content of the current directory. However if I wanted to do !ls ~ the following error appears:
:!ls ~
/bin/bash: ls ~: command not found
Shell exited 127

What would be the correct way to setup bash.exe as the shell?

Thanks!
Terra

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/12e463b4-dd4a-4a2d-abb5-97fbd30e6cacn%40googlegroups.com.

No comments:

Post a Comment