繁体   English   中英

如何配置 VSCode 以在 Ubuntu 18.04 中使用 oh-my-zsh?

[英]how to configure VSCode to use oh-my-zsh in Ubuntu 18.04?

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

波纹管是我的用户配置

{
    "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

我也尝试使用 value zsh/usr/bin/zsh但得到了同样的错误。

同样适用于/bin/bash

我还需要做什么?

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

which zsh

然后在 VSC 中,替换

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

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

适用于 Linux 的 Windows 子系统 (WSL) 中,请执行以下操作:

  1. 启动VSCode
  2. F1
  3. 输入user settings
  4. 点击按钮打开设置json
  5. 编辑或添加以下行:
"terminal.integrated.shell.osx": "/usr/local/bin/zsh",
"terminal.integrated.shellArgs.windows": [
    "-c",
    "zsh"
],
  1. 重启VSCode

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM