跳到主要内容

命令执行

环境设置

📢 下文以 Windows 环境为例,其他环境参考官方文档 Terminal Shell Integration

  1. 设置默认Shell为 Windows PowerShell
    • View -> Command Palette... -> Terminal: Select Default Profile
  2. 进入 VSCode Shell 命令行
  3. 输入 code $Profile 打开 PowerShell 配置文件
  4. 输入并保存以下内容
    if ($env:TERM_PROGRAM -eq "vscode") { . "$(code --locate-shell-integration-path pwsh)" }

执行命令