首页 > 解决方案 > 如何在 Ubuntu 18.04 中配置 VSCode 以使用 oh-my-zsh?

问题描述

我正在尝试将oh-my-zsh我的 vscode 配置为集成终端。

Bellow是我的用户配置

{
    "editor.fontSize": 12,
    "editor.tabSize": 2,
    "editor.wordWrap": "on",
    "editor.minimap.enabled": false,
    "workbench.iconTheme": "vscode-icons",
    "terminal.integrated.fontSize": 12,
    "window.zoomLevel": 0,
    "vsicons.dontShowNewVersionMessage": true,
    "terminal.integrated.shell.linux": "/bin/zsh"
} 

但是每当我尝试打开集成终端时,它都会抛出一个错误说 The terminal process command '/bin/zsh' failed to launch (exit

OS : Ubuntu 18.04
VSCode : 1.26.1

的输出echo $SHELL/bin/zsh

我也尝试过价值zsh/usr/bin/zsh但得到了同样的错误。

同样适用于/bin/bash

我还需要做什么?

标签: ubuntuvisual-studio-codeoh-my-zsh

解决方案


要解决您的问题,请在终端中运行命令

which zsh

然后在 VSC 中,替换

"terminal.integrated.shell.linux": "/bin/zsh"

"terminal.integrated.shell.linux": "{the location your terminal pointed to}"


推荐阅读