如何在vscode中为WSL2设置shellArgs?

问题描述

我正在Windows 10中使用Ubuntu20.04 WSL2,并且正在使用python3.8.5。

我希望在每次启动终端时都能运行“ pipenv shell”。

所以我在工作区settings.json中写了这个

{
    "terminal.integrated.shellArgs.linux": ["-c","pipenv shell"],"python.pythonPath": "~/.local/share/virtualenvs/flog-PxqYSvAP/bin/python3","python.terminal.activateEnvironment": false,}

但是它在终端启动时没有运行pipenv shell。 我也试过了

{
    "terminal.integrated.shellArgs.windows": ["-c","terminal.integrated.shellArgs.linux": ["-c","terminal.integrated.shell.windows": "bash.exe",}

但是它也不起作用。

有什么想法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)