Windows
Integrated terminal
7 min read
Sometimes you need a command the app doesn't have: a build script, an npm test, an unusual git
command. The integrated terminal opens a shell in the repository folder, below the Versora
screen, without switching windows. Each repository tab has its own terminals, and you can have
several open at the same time.
What you do in the terminal shows up in the app on its own: Versora follows the changes on disk and in the repository.
- Shortcut: Ctrl+` (the key to the left of 1). On the Brazilian ABNT2 keyboard, that key is the apostrophe: Ctrl+'.
- Integrated terminal button on the toolbar. With terminals open and the panel hidden, the button's tooltip shows how many are open ("Show the integrated terminal — 2 open (Ctrl+`)").
- Palette (Ctrl+P): "Integrated terminal" (with the panel open, "Hide the integrated terminal").
- With a repository open, press Ctrl+`.
- The panel opens at the bottom, with a terminal in the repository folder, for example
D:\dev\loja-web. - Type commands as usual.
- Press Ctrl+` again to hide the panel.
Hiding the panel doesn't end anything: the terminals stay open, with their programs running, and come back as they were when you show the panel again.
To change the panel's height, drag its top edge ("Drag to resize (double-click to restore the default height)"). A double-click on the edge goes back to the default height.
Each terminal is a tab inside the panel.
| Action | How |
|---|---|
| Open another terminal | Ctrl+Shift+`, the panel's New terminal (Ctrl+Shift+`) button, the terminal menu › New terminal or the "New terminal" palette command. |
| Switch terminals | Click the terminal's tab. |
| Rename | Double-click the tab, menu › Rename…, or the "Rename the terminal…" palette command. A name you give isn't replaced by the shell's name. |
| Close a terminal | Middle-click the tab, the tab's "x" (Close terminal), menu › Close terminal or the "Close the terminal" palette command. |
| Close the others | Menu › Close other terminals. |
Each tab's tooltip sums it up: "Double-click to rename; middle-click to close.". The tab also shows its state: "Opening…", "Process …" (the process number), "Exited — press Enter to reopen" or "Didn't open — see the message in the terminal".
Closing a terminal ends the shell and the programs it started. If a program is running besides the shell (for example, a development server), the app asks first:
- End the terminal session? "The terminal "…" is running …. Closing the terminal stops that program." End session button.
Closing the repository tab also ends its terminals. With a program running, the app asks Close the tab and end its terminals? ("The terminal in … is running …. Closing the tab ends its terminals and stops that program."), with the Close and end button. This applies to every way of closing the tab: the "x", Ctrl+W, "Close other tabs" and the menus.
When the shell ends on its own (you typed exit), the screen shows "The process exited. Press
Enter to start it again." (or "The process exited with code …. Press Enter to start it again.").
Press Enter to open a new shell in the same place.
| Action | Keys and menu |
|---|---|
| Copy | Ctrl+C with text selected, or Ctrl+Shift+C. With no selection, Ctrl+C interrupts the program, as always. Menu › Copy. |
| Paste | Ctrl+V or Ctrl+Shift+V. Menu › Paste. |
| Select all | Menu › Select all. |
| Find | Ctrl+Shift+F, the Find in terminal (Ctrl+Shift+F) button, menu › Find… or the "Find in terminal…" palette command. |
| Clear | The Clear the screen and the scrollback button, menu › Clear or the "Clear the terminal" palette command. |
| Open a link | Ctrl+click the address: "Ctrl+click to open the link in your browser". |
The terminal menu opens when you right-click inside it.
In the search, type the text in the Find in terminal field. The position appears as "3 of 12". Enter goes to the next one (Next (Enter)), Shift+Enter to the previous one (Previous (Shift+Enter)) and Esc closes the search. With no results, "No results" appears.
- Preferences › Terminal.
- The Terminal preferences button in the panel.
- Palette (Ctrl+P): "Preferences: integrated terminal".
| Option | What it does | Default |
|---|---|---|
| Shell › Automatic | Uses the first one found among PowerShell 7, Windows PowerShell and Command Prompt. The line shows which one it is now ("currently: …"). | Yes |
| Shell › a shell from the list | PowerShell 7, Windows PowerShell, Command Prompt or Git Bash, whichever are installed. Git Bash is only used when chosen. | — |
| Shell › Custom command | Program and arguments. Put paths with spaces in quotes; a name without a path is looked up in the PATH. | — |
| Font size | Size of the terminal text, from 8 to 32. The font is the same as the diffs'. It changes right away in open terminals. | 13 |
| Scrollback | How many lines that have scrolled off the screen you can still reach by scrolling up, from 500 to 100,000. | 5,000 lines |
The chosen shell applies to new terminals. The ones already open keep their shell.
- Test ("Test: open a terminal in …") opens a terminal with the chosen shell in the active tab's repository. With no repository open: "Open a repository in a tab to test".
- Detect again looks for the installed shells again. Use it after installing a new shell ("Just installed a shell? Detect again.").
The integrated terminal runs the shell in a Windows pseudo console (ConPTY), in the repository
folder. PowerShell opens with -NoLogo. For Git Bash, Versora uses the bash.exe from the git
installation, which sets up the environment as Git Bash does, and opens already in the repository
folder.
With the terminal open, switching to the tab of another worktree of the same repository shows that worktree's terminal, and opens a new one in its folder, if needed. This way, the terminal is always in the folder you're working in.
- Turn it on and off in Preferences › Worktrees › Terminal › The terminal follows worktree switches (on by default).
- In a worktree's menu, Open the terminal in this worktree opens its tab and shows the terminal.
See Worktrees.
In a repository that lives inside WSL, the integrated terminal opens inside the distro, with your default Linux shell, already in the repository folder. The choice in Preferences › Terminal doesn't apply in that case. See Repositories in WSL.
| Action | Default shortcut |
|---|---|
| Show or hide the integrated terminal | Ctrl+` |
| Open another terminal | Ctrl+Shift+` |
| Find in terminal | Ctrl+Shift+F |
| Copy | Ctrl+Shift+C or Ctrl+C with a selection |
| Paste | Ctrl+V or Ctrl+Shift+V |
With the focus inside the terminal, some app shortcuts still work, such as Ctrl+`, Ctrl+P, Ctrl+Tab and Ctrl+,. Ctrl+/, on the other hand, goes to the shell; to open the shortcut help inside the terminal, use F1.
Show/hide, open another and find can be changed in Preferences › Keyboard shortcuts. Copy and paste are fixed. See Keyboard shortcuts.
The terminal runs your commands directly in the shell: the app's Ctrl+Z doesn't undo what you did in the terminal. To recover something after a git command in the terminal, see the Reflog.
- "Couldn't open the terminal: …" with "Adjust the shell in Preferences › Terminal and press Enter to try again.": the chosen shell didn't open.
- "… wasn't found on this computer. Choose another shell in Preferences › Terminal.": the chosen shell was uninstalled. In Preferences, it appears as "Chosen before, but not found on this computer".
- "No known shell was found. Choose one in Preferences › Terminal.": none of the known shells is installed. Use Custom command.
- "Enter the custom shell command in Preferences › Terminal.": the custom command is empty.
- "There are unclosed quotes.": fix the custom command.
- "This version of Windows has no pseudo console (ConPTY requires Windows 10 1809 or later): HRESULT …": the integrated terminal needs Windows 10 version 1809 or later.
- "Couldn't start …" and "Folder not found: …": the program didn't start, or the repository folder is gone.
- "Couldn't read the clipboard. Use Ctrl+V in the terminal.": pasting from the menu failed; use the keyboard.
- "Couldn't copy: …": copying to the clipboard failed.
- Preferences › Terminal and Preferences › Worktrees › Terminal.
- The Terminal page can be hidden or made read-only by the company policy (id
terminal). - The company policy's Allowed servers (
allowed_servers) do not cover the integrated terminal: it's the user's shell, and what you run in it doesn't go through Versora. See Policy keys.
- Editor, external terminal and File Explorer: opening a terminal outside the app (Alt+T).
- Command line: the
versoracommand also works in the integrated terminal. - Keyboard shortcuts