Skip to content

Terminal and shell

The terminal panel sits below the file panes and can contain several tabs. Its height and visibility are remembered. Terminal tabs keep their processes and scrollback while another tab is active.

Action Shortcut
Show or hide the panel Ctrl + `
Create a terminal Ctrl + Shift + ~
Open the focused location in a terminal Mod + Enter
Previous or next terminal Ctrl + Page Up / Ctrl + Page Down
Focus the panes or terminal Alt + Up / Alt + Down

A new terminal starts in the active pane’s directory when that path exists on the session’s operating-system filesystem. From inside an archive it starts beside the archive. S3, SFTP, and client-proxy mounts have no meaningful shell directory, so the shell inherits the session’s default directory.

In a remote or elevated session, the shell and PTY run on that target—not on the computer displaying Newt.

Use Ctrl + Shift + C/V on Linux and Windows, or the standard Command shortcuts on macOS. When behavior.keep_terminal_open is enabled, an exited shell remains visible until you press Enter in that tab.

Newt places a session-aware newt command on the path of its built-in terminals and user commands. It can coordinate scripts with the visible panes:

Terminal window
newt pwd
newt cd ~/projects
newt focus Cargo.toml
newt view README.md
newt edit src/main.rs
newt cat archive.zip/README.txt
newt cp report.pdf ../archive/
newt select '*.rs' --add
newt cmd copy

Most commands accept --pane active, other, left, or right. Paths can use mounted display forms such as s3://bucket/key; relative paths resolve according to the command. Run newt cmd without an ID to list dispatchable commands.

newt select uses the same case-insensitive glob or /regex syntax as the selection dialog. It replaces the selection by default; --add and --remove adjust it. With no pattern it reads one name per line from standard input, so commands such as git ls-files | newt select can select matching entries in the pane. Only names that resolve into the pane’s current directory are selected.

Typed separators follow the target pane’s filesystem. For example, newt cd \ jumps to the current drive or share root for a Windows-style pane, but refers to a literal backslash-named entry for a Unix-style pane.

Shell integration is controlled by behavior.shell_integration for local sessions and is always available inside remote agent sessions.

Run newt --help or newt <command> --help for command-specific syntax, path-resolution rules, and examples.