【问题标题】:How can I run the command: "code ." from MacOS terminal after VS Code installation我怎样才能运行命令:“代码。”安装 VS Code 后从 MacOS 终端
【发布时间】:2019-11-20 14:15:23
【问题描述】:

我在 MacOS 终端上运行时不断收到此错误:code .

-bash: code: command not found

-bash: code: command not found image

【问题讨论】:

标签: visual-studio-code terminal macos-high-sierra


【解决方案1】:

通读 VS Code 官方文档的launching-from-the-command-line 部分回答了这个问题。

步骤

  1. 启动 VS 代码
  2. 打开 Command Palette (F1) 并键入“shell command”以找到 Shell Command: Install 'code' command in PATH 命令。
  3. 重新启动终端以使新的 $PATH 值生效。您将能够输入“代码”。在任何文件夹中开始编辑该文件夹中的文件。

【讨论】:

  • 您能否在答案中概述解决此问题的步骤?如果链接页面消失或更改,其他有相同问题的人将无法再使用您的答案...
猜你喜欢
  • 2014-01-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-11-17
  • 1970-01-01
  • 1970-01-01
  • 2015-07-09
  • 1970-01-01
相关资源
最近更新 更多