Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

terminal.md

62 lines2.9 KB

1# Terminal
2​
3## Choose a shell
4​
5Set `T3CODE_TERMINAL_SHELL` in the environment that launches the T3 Code server
6to choose the executable used for new terminals. Use an executable name or its
7full path, without surrounding quotes or command-line arguments. An unset or
8blank value keeps the platform default. If the executable cannot be started,
9T3 Code tries its usual fallback shells.
10​
11On Windows, to use Git Bash from a standard Git for Windows installation, run
12this in PowerShell:
13​
14```powershell
15[Environment]::SetEnvironmentVariable('T3CODE_TERMINAL_SHELL', 'C:\Program Files\Git\bin\bash.exe', 'User')
16```
17​
18Fully quit T3 Code, then reopen it from the Start menu and create a new terminal.
19If the app still inherits the old environment, sign out of Windows and sign in
20again. Git Bash starts as an interactive login shell. Use `bin\bash.exe`, not
21`git-bash.exe`, which launches a separate terminal window.
22​
23To restore the default, remove the variable with the same command using `$null`
24as its second argument, then restart T3 Code.
25​
26This setting belongs to the machine hosting the server, including when you
27connect from another device. It does not change provider-run commands or the
28shell used by automatic project setup and settle scripts.
29​
30## Terminal history
31​
32Each terminal keeps up to 5,000 lines and 8 MiB of scrollback on its environment
33server. T3 Code removes the oldest output when either limit is reached. A long
34line can be shortened at the start. New terminal output is not truncated.
35​
36These limits apply when you reconnect and when T3 Code restores saved terminal
37history. A client can show less scrollback than the server keeps.
38​
39On web and desktop, use Shift+PageUp and Shift+PageDown to read scrollback
40without leaving terminal input. Ctrl+Shift+Home and Ctrl+Shift+End jump to the
41start and latest output; use Cmd instead of Ctrl on macOS. Full-screen terminal
42programs keep these navigation keys.
43​
44To copy all retained output, choose Select all in the terminal's context menu,
45then copy. Cmd+A on macOS and Ctrl+Shift+A elsewhere select the same output.
46Ctrl+A still moves to the beginning of shell input on Windows and Linux.
47Jump to latest in the context menu returns to the current output.
48​
49On iPhone and iPad, long-press the terminal to paste or to choose Select Text.
50Select Text shows the visible output, where you can copy text or tap a link.
51​
52## fish
53​
54T3 Code starts fish with `no-query-term`, avoiding startup waits for terminal
55replies. This disables optional fish features that depend on those replies.
56T3 Code's exported `fish_features` also hides any universal flags you set with
57`set -U fish_features`.
58​
59To preserve those flags or enable queries with `query-term`, include them in
60`fish_features` in the environment that launches T3 Code. A shell export applies
61when you launch T3 Code from that shell; it does not configure a desktop app
62launched from the Dock or Finder. Enabling queries can restore the startup wait.