Skip to main content
A terminal that only sees bytes cannot tell a prompt from output, or a finished command from a hung one. tty7’s shell integration closes that gap: the shell reports where prompts begin, what was submitted, what it exited with, and where it is. You do not install it. It is injected when the pane’s shell starts, and removes itself from the equation if you run the same shell elsewhere.

Which shells

TTY7_SHELL_INTEGRATION is set once it is active, and guards against a second injection when shells nest.
A shell launched with arguments you wrote — shell.args, or a custom_shells entry — is left alone, because tty7’s injection would conflict with the flags you chose. Arguments tty7’s own detection supplied (Git Bash’s -i -l, a WSL row’s --distribution) do not count, so those rows are still integrated.

What it reports

What turns off without it

Run a shell tty7 does not integrate with, and everything below still works — it just falls back to less precise sources:
  • Ghost suggestions, the completion menu, and ⌃ R’s fuzzy history
  • “Command finished” notifications and the failure marks in history search
  • Exact working-directory tracking (tty7 falls back to inspecting the process)
Panes, splits, scrollback, search, SSH, and the CLI are unaffected.

Per-pane history

When per_pane_history is on, the integration is also what makes it work. It runs after your own rc file — which is the only reason it can: $HISTFILE is yours to set, wherever you like, and nothing outside the shell knew where it pointed until then. The sequence is: seed the pane’s private file from your real history so it does not start blank, record how much was seeded, repoint $HISTFILE, and merge everything past that mark back when the pane closes. More about history →

Remote shells

For a remote workspace or an SSH pane, the same scripts are sent over the connection at login, so a remote pane reports its cwd, exit codes, and prompt marks exactly like a local one. Turn it off for a particular host under that profile’s Advanced → Session.