|
2 | 2 | title: Terminal |
3 | 3 | --- |
4 | 4 |
|
| 5 | +import React from 'react'; |
| 6 | +import VideoPlayer from '@site/src/components/Video/player'; |
| 7 | + |
5 | 8 | Phoenix Code has a built-in terminal so you can run commands without leaving the editor. |
6 | 9 |
|
7 | 10 | > The terminal is available only in desktop apps. |
8 | 11 |
|
9 | | -<!-- Add an image here showing the terminal panel with a couple of tabs and a running command --> |
| 12 | +<!-- Add a workflow video here showing: opening the panel, running a command, multiple tabs, switching shells, closing --> |
10 | 13 |
|
11 | 14 | ## Opening the Terminal |
12 | 15 |
|
13 | | -There are a few ways to open the terminal: |
| 16 | +Open the terminal in any of these ways: |
14 | 17 |
|
15 | 18 | - Click the **Tools** button *(grid icon)* in the bottom-right toolbar and select **Terminal** |
16 | 19 | - Go to **View > Terminal** from the menu bar |
17 | 20 | - Press `F4` |
| 21 | +- Right-click a file or folder in the project tree and choose **Integrated Terminal**. The terminal opens at that folder (or the file's containing folder) |
| 22 | + |
| 23 | +<!-- Add an image of the project tree right-click menu showing the Integrated Terminal item --> |
18 | 24 |
|
19 | 25 | ## Tabs |
20 | 26 |
|
21 | 27 | You can have multiple terminals open at the same time, each in its own tab. The tab sidebar shows the running process name for each terminal. |
22 | 28 |
|
23 | 29 | To create a new tab, click the **+** button at the bottom of the tab sidebar. |
24 | 30 |
|
25 | | -To close a tab, hover over it and click the **X** button. If a process is still running, Phoenix Code asks for confirmation before closing. |
| 31 | +To close a single tab, hover over it and click the **X** button. To close every terminal at once, click the panel's X button. Phoenix Code asks for confirmation if any process is still running. |
| 32 | + |
| 33 | +When the terminal is focused and more than one tab is open, pressing `F4` cycles to the next tab. |
26 | 34 |
|
27 | | -<!-- Add an image here showing the tab sidebar with multiple terminal tabs --> |
| 35 | +<!-- Add an image of the tab sidebar with multiple terminal tabs --> |
28 | 36 |
|
29 | 37 | ## Shell Selection |
30 | 38 |
|
31 | | -Click the **dropdown button** *(chevron icon)* next to the new tab button to pick a different shell. The available options depend on your operating system: |
| 39 | +Click the **dropdown button** *(chevron icon)* next to the new tab button to pick a different shell. The default options are: |
32 | 40 |
|
33 | 41 | - **macOS**: zsh, bash, fish |
34 | 42 | - **Linux**: bash, zsh, fish |
35 | 43 | - **Windows**: PowerShell, Command Prompt, Git Bash, WSL |
36 | 44 |
|
37 | 45 | Selecting a shell sets it as the default and opens a new terminal with it right away. |
38 | 46 |
|
39 | | -> Only shells that are installed on your system are shown. |
40 | | -
|
41 | | -## Right-Click Menu |
42 | | - |
43 | | -Right-click inside the terminal to access: |
44 | | - |
45 | | -- **Copy** - copy selected text |
46 | | -- **Paste** - paste from clipboard |
47 | | -- **Clear Terminal** - clear the terminal output |
| 47 | +> Only shells installed on your system are shown. Any other compatible shell on your system (for example, PowerShell Core on Windows) also appears in the list. |
48 | 48 |
|
49 | 49 | ## Keyboard Shortcuts |
50 | 50 |
|
51 | 51 | | Action | Shortcut | |
52 | 52 | |--------|----------| |
53 | | -| Toggle terminal | `F4` | |
| 53 | +| Toggle terminal / cycle to next instance (when more than one is open) | `F4` | |
54 | 54 | | Switch focus between editor and terminal | `Shift + Escape` | |
55 | 55 | | Clear terminal buffer | `Ctrl/Cmd + K` | |
0 commit comments