簡體   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