Skip to content

Commit 3f2d609

Browse files
authored
Merge pull request #8559 from microsoft/merogge/intellisense
add terminal intellisense docs
2 parents f1ab5b4 + 6539957 commit 3f2d609

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed
Lines changed: 3 additions & 0 deletions
Loading

docs/terminal/shell-integration.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,29 @@ When using shell integration, it has a "quality" associated with it that declare
9191

9292
To view the shell integration quality, hover the terminal tab. Optionally, select **Show Details** on the hover to view more detailed information.
9393

94+
## IntelliSense (Preview)
95+
96+
IntelliSense in the terminal enables you to receive suggestions for files, folders, commands, command arguments and options. This feature is powered by shell integration `setting(terminal.integrated.shellIntegration.enable)` and can be enabled with `setting(terminal.integrated.suggest.enabled)`.
97+
98+
![A user has typed git checkout in a terminal and requests completions. The completion list shows branch names like main and merogge/terminal-section](images/shell-integration/terminal-suggest.png)
99+
100+
VS Code sources commands from [Fig specs](https://github.com/withfig) and validates per-shell built-in functions (for `pwsh`, `bash`, `zsh`, and `fish`) against the `$PATH` to ensure they exist. On Windows, you can configure the particular set of executables with the `setting(terminal.integrated.suggest.windowsExecutableExtensions)` setting.
101+
102+
### Keyboard navigation
103+
104+
By default, `kbstyle(Tab)` inserts the suggestion. Once navigation of the list has occurred, `kbstyle(Enter)` will similarly insert the suggestion. You can configure this behavior with the `setting(terminal.integrated.suggest.selectionMode)` setting.
105+
106+
To both insert and run the completion in the terminal on acceptance, configure `setting(terminal.integrated.suggest.runOnEnter)`.
107+
108+
IntelliSense can be triggered manually `kb(workbench.action.terminal.requestCompletions)` or by typing, which can be disabled with `setting(terminal.integrated.suggest.quickSuggestions)`. Intellisense can also be triggered when certain characters are typed, such as `/`, which can be configured with `terminal.integrated.suggest.suggestOnTriggerCharacters`.
109+
110+
When the shell provides an inline completion, VS Code surfaces this as the first completion item in the list. You can further configure this behavior with the `setting(terminal.integrated.suggest.inlineSuggestion)` setting.
111+
112+
The `setting(terminal.integrated.suggest.showStatusBar)` setting controls if a status bar shows up at the bottom of the list. This status bar provides actions like **Learn More** (`kb(workbench.action.terminal.suggestLearnMore)`), **Insert** (`kb(workbench.action.terminal.acceptSelectedSuggestion)`), and **Configure** (`kb(workbench.action.terminal.configureSuggestSettings)`). When you use the IntelliSense feature for the first several times, the **Learn More** action is highlighted for extra discoverability.
113+
114+
The suggest control can show extra details about the suggestion. You can toggle the visibility of these details with `kb(workbench.action.terminal.suggestToggleDetails)`. Screen reader users can focus the details control with `kb(workbench.action.terminal.suggestToggleDetailsFocus)` to hear them read out.
115+
116+
94117
## Command decorations and the overview ruler
95118

96119
One of the things that shell integration enables is the ability to get the exit codes of the commands run within the terminal. Using this information, decorations are added to the left of the line to indicate whether the command succeeded or failed. These decorations also show up in the relatively new overview ruler in the scroll bar, just like in the editor.
@@ -197,24 +220,6 @@ The following keyboard shortcuts should work in PowerShell when shell integratio
197220
- `kbstyle(Shift+End)`: Defaults to `SelectLine` on all platforms
198221
- `kbstyle(Shift+Home)`: Defaults to `SelectBackwardsLine` on all platforms
199222

200-
## Experimental IntelliSense for PowerShell
201-
202-
Experimental IntelliSense for PowerShell shows a completion list when typing in PowerShell, similar to the editor experience. Behind the scenes, this functionality is powered by the PowerShell session's native completion API, so context-aware completions like variables are available.
203-
204-
![PowerShell IntelliSense shows completions like Get-Alias, Get-ChildItem, for example when typing Get-](images/shell-integration/pwsh-intellisense.png)
205-
206-
You can enable the experimental IntelliSense for PowerShell with the `setting(terminal.integrated.suggest.enabled)` setting.
207-
208-
```json
209-
"terminal.integrated.suggest.enabled": true
210-
```
211-
212-
> **Note**: This functionality is currently only available on Windows and macOS.
213-
214-
### Git and VS Code completions
215-
216-
When experimental IntelliSense is enabled, completions for CLIs `git`, `code`, and `code-insiders` are turned on by default. If your PowerShell profile already has completions, you may want to turn these off by using the `setting(terminal.integrated.suggest.builtinCompletions)` setting.
217-
218223
## Enhanced accessibility
219224

220225
The information that shell integration provides to VS Code is used to improve [accessibility in the terminal](/docs/configure/accessibility/accessibility.md#terminal-accessibility). Some examples of enhancements are:

0 commit comments

Comments
 (0)