From d2c60d41e4501e8e112142ab96c9397b73784181 Mon Sep 17 00:00:00 2001 From: gregvanl Date: Mon, 19 Sep 2022 06:55:01 -0700 Subject: [PATCH] Update deprecated terminal settings --- .devcontainer/devcontainer.json | 2 +- docs/containers/ssh.md | 2 +- docs/editor/tasks.md | 6 ++++-- docs/remote/attach-container.md | 2 +- docs/remote/containers-tutorial.md | 2 +- docs/supporting/troubleshoot-terminal-launch.md | 14 ++++++++++---- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f80e655d9..76ff0edc7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ "name": "VS Code Docs", "dockerFile": "Dockerfile", "settings": { - "terminal.integrated.shell.linux": "/bin/zsh" + "terminal.integrated.defaultProfile.linux": "zsh" }, "extensions": [ "yzhang.markdown-all-in-one", diff --git a/docs/containers/ssh.md b/docs/containers/ssh.md index 3daa7f886..506effbf1 100644 --- a/docs/containers/ssh.md +++ b/docs/containers/ssh.md @@ -23,7 +23,7 @@ It is also possible to connect to the remote Docker engine directly using SSH tu * **Linux:** `ssh-agent` is present by default. Do `ssh-add `. Ubuntu was tested; you might have different results on other distributions. - * **macOS:** `ssh-agent` is present by default, but `ssh-add` does not persist across logins. Do `ssh-add `. We recommend configuring VS Code to run this command on terminal startup with `terminal.integrated.shellArgs.osx` or otherwise configuring a startup script. You can also manually run that command each login. + * **macOS:** `ssh-agent` is present by default, but `ssh-add` does not persist across logins. Do `ssh-add `. We recommend configuring VS Code to run this command on terminal startup with `terminal.integrated.profiles.osx` `args` value or otherwise configuring a startup script. You can also manually run that command each login. 1. Verify that your identity is available to the agent with `ssh-add -l`. It should list one or more identities that look something like `2048 SHA256:abcdefghijk somethingsomething (RSA)`. If it does not list any identity, you will not be able to connect. Also, it needs to have the right identity. The Docker CLI working does not mean that the Explorer window will work. The Explorer window uses [dockerode](https://www.npmjs.com/package/dockerode) (which in turn uses [ssh2](https://www.npmjs.com/package/ssh2)), whereas the Docker CLI uses the `ssh` command, and benefits from an automatically inferred configuration. diff --git a/docs/editor/tasks.md b/docs/editor/tasks.md index c624abd70..1c7b68d70 100644 --- a/docs/editor/tasks.md +++ b/docs/editor/tasks.md @@ -888,10 +888,12 @@ That was tasks - let's keep going... ### Can a task use a different shell than the one specified for the Integrated Terminal? -Yes. You can use the `"terminal.integrated.automationShell.*"` setting to set the shell that will be used for all automation in VS Code, which includes Tasks. +Yes. You can use the `"terminal.integrated.automationProfile.*"` setting to set the shell that will be used for all automation in VS Code, which includes Tasks. ```json - "terminal.integrated.automationShell.windows": "cmd.exe", + "terminal.integrated.automationProfile.windows": { + "path": "cmd.exe" + } ``` Alternatively, you can override a task's shell with the `options.shell` property. You can set this per task, globally, or per platform. For example, to use cmd.exe on Windows, your `tasks.json` would include: diff --git a/docs/remote/attach-container.md b/docs/remote/attach-container.md index a8be938b4..d89a341d9 100644 --- a/docs/remote/attach-container.md +++ b/docs/remote/attach-container.md @@ -36,7 +36,7 @@ Both of these files support a subset of `devcontainer.json` properties: // Set *default* container specific settings.json values on container create. "settings": { - "terminal.integrated.shell.linux": "/bin/bash" + "terminal.integrated.defaultProfile.linux": "bash" }, // Add the IDs of extensions you want installed when the container is created. diff --git a/docs/remote/containers-tutorial.md b/docs/remote/containers-tutorial.md index 2d6ebb4fa..a3c6fb3fe 100644 --- a/docs/remote/containers-tutorial.md +++ b/docs/remote/containers-tutorial.md @@ -131,7 +131,7 @@ The `devcontainer.json` is basically a config file that determines how your dev "customizations": { "vscode": { "settings": { - "terminal.integrated.shell.linux": "/bin/bash" + "terminal.integrated.defaultProfile.linux": "bash" }, "extensions": [ diff --git a/docs/supporting/troubleshoot-terminal-launch.md b/docs/supporting/troubleshoot-terminal-launch.md index 91c5e6135..5d0ee9e4a 100644 --- a/docs/supporting/troubleshoot-terminal-launch.md +++ b/docs/supporting/troubleshoot-terminal-launch.md @@ -27,12 +27,12 @@ To troubleshoot Integrated Terminal launch failures in Visual Studio Code, follo 1. **Check your user settings.** Review these `terminal.integrated` [settings](/docs/getstarted/settings.md) that could affect the launch: - * `terminal.integrated.shell.{platform}` - The path of the shell that the terminal uses. - * `terminal.integrated.shellArgs.{platform}` - The command-line arguments when launching the shell process. + * `terminal.integrated.defaultProfile.{platform}` - The default shell profile that the terminal uses. + * `terminal.integrated.profiles.{platform}` - The defined shell profiles. Sets the shell path and arguments. * `terminal.integrated.cwd` - The current working directory (cwd) for the shell process. * `terminal.integrated.env.{platform}` - Environment variables that will be added to the shell process. * `terminal.integrated.inheritEnv` - Whether new shells should inherit their environment from VS Code. - * `terminal.integrated.automationShell.{platform}` - Shell path for automation-related terminal usage like tasks and debug. + * `terminal.integrated.automationProfile.{platform}` - Shell profile for automation-related terminal usage like tasks and debug. * `terminal.integrated.splitCwd` - Controls the current working directory a split terminal starts with. * `terminal.integrated.windowsEnableConpty` - Whether to use ConPTY for Windows terminal process communication. @@ -92,7 +92,13 @@ This can happen if Windows Subsystem for Linux (WSL) is not set up with a valid The easy fix for this issue is to use the 64-bit version. If you must use the 32-bit version, you need to use the sysnative path when configuring your shell path instead of System32. Adding this setting should fix the issue: ```json -"terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\cmd.exe" +{ + "terminal.integrated.profiles.windows": { + "Command Prompt": { + "path": "${env:windir}\\Sysnative\\cmd.exe" + } + } +} ``` ### A native exception occurred