将{WSL :: Bash}设置为默认外壳会在cmder中引发错误

问题描述

note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
-v: -c: line 1: Syntax error: unexpected end of file


ConEmuC: Root process was alive less than 10 sec,ExitCode=0.
Press Enter or Esc to close console...

这是我得到的错误

我也将鱼壳设置为WSL中的认壳。

解决方法

对于Windows 10上的WSL1,版本晚于1909年(是的,我可以使用wsl2,但由于公司原因,我无法使用它)

尝试将命令设置为wsl.exe -new_console:d:C:\_stuff\code -cur_console:p5,将任务参数设置为/dir "c:/_stuff/code" /icon "c:/_distros/ubuntu/ubuntu1804.exe"

您可能需要更改文件位置,以使命令和参数适合您的设置。 c:/_stuff/code是我存放所有存储库的地方,而c:/_distros/ubuntu是我安装ubuntu的地方。