Terminal
In Advanced and Expert mode, View > Panels > Terminal or Ctrl+` opens a shell in the bottom panels, beside Output. Each window has one. Press Ctrl+` again in the terminal to hide the panel and go back to the editor. It needs Windows 10 version 1809 or later. In Simple mode none of this runs, and a window that has never shown the panel costs nothing.
Automatic takes the first of PowerShell 7, Windows PowerShell and Command Prompt. Preferences > Terminal also lists Git Bash and WSL when they are there, and in Expert mode you can type any command line. The shell starts in the active file's folder. An Untitled tab uses the folder workspace, then your user folder.
Keys and the clipboard#
Every key goes to the shell except these, so Vim, nano and readline get Ctrl+letter, Alt+letter and the F keys:
| Key | What it does |
|---|---|
| Ctrl+` | Back to the editor, or whatever the Terminal command is set to |
| Ctrl+Shift+C, Ctrl+Insert | Copy |
| Ctrl+Shift+V, Shift+Insert | Paste |
| Ctrl+Shift+ any other key | TriPad's own, such as the palette and the modes |
| Ctrl+Tab | The next document |
| Shift+PgUp, PgDn, Home, End | Scroll the history |
| Alt+F4, Alt+Space, Alt alone, the Menu key | Windows' own |
- Ctrl+C copies if text is selected, and then ends the selection. Otherwise it is an interrupt.
- Ctrl+V pastes on the normal screen. On the alternate screen, where Vim runs, it goes to the program.
- Paste uses bracketed paste when the program asks for that, with control characters taken out, so pasted text can't end the bracket. If it doesn't ask, pasting more than one line asks you first and says how many, because a shell may run each line as it arrives. A program that asks for brackets and ends without turning them off leaves them on until the next shell, and one line ending in a line end counts as one line.
- Copy rejoins lines the terminal wrapped.
- The mouse always selects. The wheel scrolls the history, and on the alternate screen it sends Up and Down.
Right-click has Copy, Paste, Select All, Open History in New Tab, Clear History, Restart Shell and End Shell. They are in the command palette too. There is no Find inside the panel: Open History in New Tab is how you search, and Find, Filter Lines and the rest then work on it.
Colours and size#
The default text and background are the theme's. The 16 ANSI colours are a dark or a light set, moved until they can be read on the background, and changing the theme recolours what is there. 256 colours and 24-bit colours are exact, up to about 240 mixes of colour, bold and so on in one terminal. After that the nearest takes over until the window closes.
A resize, a DPI change or Ctrl+wheel reaches the shell after 100 ms, so dragging the panel makes one resize. The history isn't rewrapped: old lines keep the width they had. Wide characters take two cells, and how well they line up depends on the font.
Closing#
| What happens | What you see |
|---|---|
| Hide the panel, or switch the window to Simple | The shell keeps running, and is there when you come back |
| The shell exits | The history stays, with Shell ended (exit code 0). Press Enter for a new one. |
| Restart Shell, End Shell, or closing the window or TriPad, with a program running | It asks once, naming the program. Windows shutting down doesn't ask |
cls | It clears the screen and the history, because Windows' console asks for both |
| Closing the window or TriPad, with nothing running | The shell ends, and nothing waits for it |
| TriPad crashes or is killed | The shell goes too |
Console programs end with the console. A program with a window of its own, such as code . or notepad started
from the terminal, stays open after the terminal has gone. WSL always has programs running behind it, so it always
asks. A console program killed in the moment it starts, before it has joined the console, doesn't hear that the
console closed, and goes on until it ends by itself.
What runs#
Opening a file never starts a shell. One starts only when the panel gets the keyboard focus, and a panel that
comes back by itself, when a window opens or changes mode, runs nothing until you click it or press Ctrl+`. TriPad finds shells by their full paths
and never looks in the file's folder, so a cmd.exe in a folder someone sent is ignored.
A shell is a shell, though. Once it runs, what it does in the folder is up to it, as in any terminal. Git Bash's prompt, for one, can run Git there, so a hostile repository can do in the panel what it could in any other terminal.
Programs can only draw. Everything else they can ask of a terminal is ignored, and setting the clipboard above all.
The history is never saved, because it can hold secrets. The settings are Shell and History in [Terminal] in
TriPad.ini, and nothing is read from a project.