gpt4 book ai didi

visual-studio-code - 在 vscode 中运行任务时使用 zsh

转载 作者:行者123 更新时间:2023-12-04 03:14:35 31 4
gpt4 key购买 nike

我想要实现的是每当我在 VSCode 中运行任务时在“输出” Pane 中使用 zsh,但它继续使用 /bin/sh反而。
“终端” Pane 虽然正确使用了 zsh。

这是我的配置:

➜  ~ echo $SHELL
/bin/zsh
➜ ~ which zsh
/bin/zsh

任务文件
{
"version": "0.1.0",
"command": "echo Im $0",
"suppressTaskName": true,
"isShellCommand": {
"executable": "/bin/zsh"
},
"showOutput": "always",
"tasks": [
{
"taskName": "Test",
"args": ["test"]
}
]
}

运行任务时的输出是: Im /bin/sh

最佳答案

您可以从菜单 File -> Preferences -> Settings 更改设置.然后把选项用zsh shell 。

... another lines
... another lines
"terminal.integrated.shell.linux": "zsh"

Screenshot from my experience

关于visual-studio-code - 在 vscode 中运行任务时使用 zsh,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42202777/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com