Repository navigation
terminal
Pre-alpha. Everything on this page is in the current build except the section Planned.
Each panel shows either its files or one of its terminals. Switching is one key, Ctrl+Ö (as in VS Code on a German keyboard), and switching back keeps the terminal running.
The terminal keys sit on a physical key, not on a character: Ctrl+Ö is the key right of L. On a US keyboard the same key is Ctrl+;, on a Spanish one Ctrl+Ñ; Ctrl+Ä is the key next to it (Ctrl+' on US, Ctrl+´ on Spanish). The toggle and the new terminal also sit on the key left of 1: Ctrl+` on US, Ctrl+^ on German, Ctrl+² on a French keyboard (where the key right of L is M, and Ctrl+M stays Multi-Rename). They stay on that key when you switch the keyboard layout, and the menus and the command palette show what your layout prints on it.
-
Ctrl+Ö switches the active panel to a terminal in the folder the panel shows, and back to
its files. The first time it starts your default shell - in a WSL folder
(
\\wsl.localhost\<distribution>\...) that distribution's shell; after that it returns to the same running shell while the panel stays on that shell's system. When the panel has moved to another system (fromC:into a WSL share, or into another distribution), it opens a fitting shell beside the first one. On a US keyboard it is Ctrl+;; the key left of 1 (Ctrl+`, Ctrl+^, Ctrl+²) works too. - Ctrl+Shift+Ö (Ctrl+Shift+; or Ctrl+Shift+` on a US keyboard) starts a new terminal and lets you choose the shell: a numbered list where 1-9 or Enter starts one and Esc cancels. It works from the file list; with only one shell installed it starts that one. On a server panel there is nothing to choose: the new terminal is a shell on that server.
- Ctrl+Ä (Ctrl+' on a US keyboard) lays the active terminal over both panels, the whole window width; the same key brings both panels back. On a panel showing files it first opens the terminal as Ctrl+Ö does. The other panel is only hidden; both come back when you switch to the files (Ctrl+Ö), close the last terminal, or another panel becomes active. Not kept across a restart; the bars stay.
- The other panel keeps showing its files.
-
Every key goes to the shell - Tab, the F-keys, Ctrl+C, Ctrl+Tab, the arrows - except
Ctrl+Ö and Ctrl+Ä, the keys rCommander keeps to get back to the files and to widen the terminal,
and Ctrl+Shift+A, the list of the panel's terminal sessions. Full-screen programs such as
vimorhtopget the keys they need. - Wide and combined characters (Chinese, Japanese, emoji, accents typed as two code points) take two cells or stay on their letter, as in Windows Terminal.
-
Copy and paste as in Windows Terminal: select text with the mouse (a double click selects a
word, a triple click a line), then Ctrl+C or a right click copies it and clears the selection.
With nothing selected Ctrl+C interrupts the running program as always and a right click pastes
(Windows). Ctrl+V pastes the text on the clipboard; with no text on it - a screenshot, say -
Ctrl+V goes to the running program, so Claude Code can paste the image. When a program takes
the mouse - Claude Code,
vimwith the mouse on - hold Shift while you select to select in the terminal instead; a program that copies by itself (Claude Code does, also over SSH) puts its text on the Windows clipboard. Ctrl+Shift+C and Ctrl+Shift+V copy and paste either way. Copy text as soon as it is selected (off by default) copies when you let go of the mouse. Text with a line break asks first (Paste 3 lines?), because each line break runs what comes before it: Enter pastes, Esc cancels. So does text with a control character other than a tab - Ctrl+C, Ctrl+U, Ctrl+W, a backspace or an escape -, which the program would take as a key. -
Paste a screenshot as a file path with Ctrl+Alt+V: rCommander saves the clipboard's
image as a PNG file where the terminal's program can read it and pastes its path - for Claude
Code and other programs that read an image from a path. In PowerShell or cmd the file is in
your temp folder, in WSL the same file under
/mnt/c/..., in an SSH terminal it is uploaded to/tmpon the server (without asking). The files are removed when the terminal closes. Windows only for now; the key can be changed in Settings > Keyboard > Shortcuts, and the feature switched off in Settings > Terminal. - Scroll back with Shift+Page Up / Page Down or the mouse wheel.
- Colours follow rCommander's light or dark theme.
The file view and its terminal keep to one folder, in both directions:
- The terminal follows the panel. Turning a panel to its terminal, or changing the panel's folder while it shows the terminal, sends the shell to the panel's folder.
-
The panel follows the terminal. Turning back to the files shows the folder the shell was
last in, after you
cd-ed around in it. - Nothing is typed into a running program. rCommander changes the shell's folder only while the shell waits at an empty prompt. When a program runs or you have half typed a line, it waits for the next prompt, and the panel's status line says why (A program runs in the shell; it changes to the panel's folder at the next prompt.).
- A shell stays on its own system. A local shell is never sent into a WSL share, a WSL shell never out of its distribution's share; the status line says why the shell stayed.
-
A panel never follows a terminal to another machine. An SSH terminal never moves the local
panel, and a folder any shell reports on a network share (
\\server\share) is ignored; WSL shares are fine. A program on a server cannot make Windows sign in to a share of its choosing. - Folder names are quoted for the shell, so nothing in a name can run as a command.
- This needs the shell to report its folder and prompt. rCommander sets that up by itself for the shells it starts - PowerShell, Windows PowerShell, bash (also in WSL), zsh and cmd - without touching your profile files. Other shells keep their folder, and the status line says so.
rCommander hands its shells these lines at their start, so you need them only for a shell it does not start itself - a nested shell, or one started while Shell integration is switched off. Each prints the folder and marks the prompt before every prompt; it types nothing and changes nothing else.
PowerShell 7 and Windows PowerShell - put this at the end of your $PROFILE:
# rCommander shell integration for PowerShell 7 and Windows PowerShell 5.1: at every prompt the
# folder (OSC 9;9) and the prompt marks (OSC 133), around the prompt you already have.
# rCommander runs it with -EncodedCommand after your profile; to add it yourself, put it at the
# end of your $PROFILE.
if (-not $global:__rcPromptWrapped) {
$global:__rcPromptWrapped = $true
$global:__rcPrompt = $function:prompt
function global:prompt {
$esc = [char]27
$out = "$esc]133;D$esc\"
$location = $executionContext.SessionState.Path.CurrentLocation
if ($location.Provider.Name -eq 'FileSystem') {
$out += "$esc]9;9;`"$($location.ProviderPath)`"$esc\"
}
$out += "$esc]133;A$esc\"
if ($global:__rcPrompt) {
$out += & $global:__rcPrompt
} else {
$out += "PS $location> "
}
$out + "$esc]133;B$esc\"
}
}bash - save this as ~/.rcommander.bash and add
PROMPT_COMMAND="source ~/.rcommander.bash${PROMPT_COMMAND:+;$PROMPT_COMMAND}" to ~/.bashrc:
# rCommander shell integration for bash: before every prompt the folder (OSC 7) and the prompt
# marks (OSC 133). rCommander runs it through PROMPT_COMMAND ('eval "$RC_SHELL_INTEGRATION"');
# To add it yourself: save it as ~/.rcommander.bash and put
# PROMPT_COMMAND="source ~/.rcommander.bash${PROMPT_COMMAND:+;$PROMPT_COMMAND}" in ~/.bashrc.
# shellcheck shell=bash disable=SC1003 # the ST of an OSC is ESC and a backslash
__rc_status=$?
if [[ -z ${__rc_loaded-} ]]; then
__rc_loaded=1
# The folder as a file URL, every byte but [A-Za-z0-9/._~-] percent-encoded.
__rc_osc7() {
local LC_ALL=C path=$PWD encoded='' char i
for ((i = 0; i < ${#path}; i++)); do
char=${path:i:1}
case $char in
[A-Za-z0-9/._~-]) encoded+=$char ;;
*)
printf -v char '%%%02X' "'$char"
encoded+=$char
;;
esac
done
printf '\e]7;file://%s%s\e\\' "${HOSTNAME-}" "$encoded"
}
__rc_precmd() {
printf '\e]133;D;%s\e\\' "$1"
__rc_osc7
printf '\e]133;A\e\\'
# The end of the prompt, once in PS1 whatever ~/.bashrc made of it.
[[ $PS1 == *'133;B'* ]] || PS1+='\[\e]133;B\e\\\]'
}
__rc_return() { return "$1"; }
fi
__rc_precmd "$__rc_status"
__rc_return "$__rc_status"zsh - put this into ~/.zshrc:
# The folder as a file URL, every byte but [A-Za-z0-9/._~-] percent-encoded.
__rc_osc7() {
emulate -L zsh
local LC_ALL=C encoded= char
local -i i
for (( i = 1; i <= ${#PWD}; i++ )); do
char=${PWD[i]}
if [[ $char == [A-Za-z0-9/._~-] ]]; then
encoded+=$char
else
printf -v char '%%%02X' "'$char"
encoded+=$char
fi
done
printf '\e]7;file://%s%s\e\\' "$HOST" "$encoded"
}
__rc_precmd() {
local ret=$?
printf '\e]133;D;%s\e\\' $ret
__rc_osc7
printf '\e]133;A\e\\'
# The end of the prompt, once in PS1 whatever a theme made of it.
[[ $PS1 == *'133;B'* ]] || PS1+=$'%{\e]133;B\e\\%}'
}
autoload -Uz add-zsh-hook
add-zsh-hook precmd __rc_precmdcmd has no profile; rCommander sets its PROMPT variable for the shells it starts.
A bar above the terminal lists the panel's sessions. Click one to show it, its x to close it,
and + to start another with a shell choice. Ctrl+Ö always returns to the session the panel
showed last.
From the keyboard, Ctrl+Shift+A - also inside the terminal - lists the panel's sessions: the arrows or a session's first letter choose, Enter shows it, Delete closes it, Escape goes back to the terminal. Ctrl+Shift+Ö starts another session.
When a shell ends (exit), the panel shows its newest other session, or its files if none is
left; the status line shows the exit code.
| Shell | Where |
|---|---|
PowerShell 7 (pwsh), Windows PowerShell, Command Prompt (cmd) |
Windows, those installed |
| WSL: <distribution> | Windows, one entry per installed WSL distribution |
| bash, zsh, fish, sh and your login shell | Linux and macOS (after the beta) |
The default shell - the one Ctrl+Ö starts - is set in Settings, page Terminal. When it is
not installed, the first shell found is used. cmd and Windows PowerShell always come from
Windows itself (%SystemRoot%\System32); a program of the same name earlier in PATH, or in a
relative PATH entry, is never started in their place.
A WSL shell starts in the matching Linux folder of the panel's folder:
| Panel shows | The WSL shell starts in |
|---|---|
C:\Users\you\Documents |
/mnt/c/Users/you/Documents |
\\wsl.localhost\Ubuntu\home\you\src (in WSL: Ubuntu) |
/home/you/src |
| A folder of another distribution, a network share | the distribution's home folder (~) |
The distributions are the same ones the drive bar shows. A stopped distribution starts when you open its shell; its start-up messages appear in the terminal. Without WSL there are no WSL entries.
A terminal can run a shell on an SSH server, over the same connection as the server's panel (one TCP connection for both).
- Open it with Ctrl+Ö on a server panel - it starts in the panel's folder - or with Terminal in the connection manager, which shows it in the active panel and starts in the connection's Start folder (else the server's home folder).
- The login script runs first. If the connection has a login script, for example sudo -i with password, it plays on the new shell before you can type; the status line shows its step (Login script root: step 2 of 4 - Ctrl+C stops it.) and keys you press meanwhile wait, except Ctrl+C, which stops the script. A script that times out or fails says so in the terminal and the status line, and the shell is yours. Secrets come from the vault and are never shown or logged. With the vault locked, the connection's password asks for the master password first; a secret stored with the script stops the terminal from opening (vault locked) until you unlock the vault.
- The folder is changed to after the login script, quoted for the server's shell, so spaces and quotes in a name are safe; a folder with a line break or another control character is refused before anything reaches the server.
-
Full-screen programs such as
htopandvimget a real terminal (xterm-256color); a new window size is passed on to the server. -
When the shell ends (
exit) or the connection drops, the terminal ends; the status line shows the exit code when the server sent one. - An SSH terminal does not follow the panel's folder afterwards, nor the panel the shell's; the settings below apply to local and WSL shells.
An AI assistant can open terminals over MCP (terminal_open, also a WSL shell by distribution or
an SSH shell by connection), type into them and read the screen back as text; each start and
each input needs your confirmation. A password the login script typed is masked in what the
assistant reads, and with the vault locked its call is refused instead of asking you. A terminal an assistant opens appears in its panel, so you see what it does. See
MCP server.
Settings, page Terminal:
| Setting | Default | What it does |
|---|---|---|
| Default shell | the first shell found | The shell Ctrl+Ö and new terminals start |
| Terminal follows the panel | on | The shell changes to the panel's folder |
| Panel follows the terminal | on | The files show the shell's last folder when you turn back |
| Shell integration | on | New shells report their folder and prompt; without it neither direction follows. Applies to shells started from then on |
| End programs started in a terminal with it | on | Closing a terminal, or rCommander, also ends what its shell started - ssh, a build, a window opened from it - so nothing keeps running unseen; off, only the shell ends. Windows (elsewhere closing the terminal hangs them up). Applies to terminals opened from then on |
| Ctrl+C copies selected text | on | Ctrl+C copies the selection and clears it; with nothing selected it interrupts. Off, Ctrl+C always interrupts |
| Right click copies selected text | on | A right click copies the selection and clears it; with nothing selected it pastes (Windows). Off, a right click always pastes |
| Copy text as soon as it is selected | off | Letting go of the mouse after selecting copies the text at once |
| Shift with the mouse selects text | on | Shift while selecting selects in the terminal even when a program takes the mouse. Off, the mouse always goes to such a program |
| Programs may copy to the clipboard | on | A program - also on a server - may put text on the clipboard (OSC 52), as Claude Code does; programs can never read it this way. Off, such copies are dropped |
| Ctrl+Alt+V pastes an image as a file path | on | The clipboard's image is saved as a PNG where the terminal's program reads it (temp folder, /mnt/... in WSL, /tmp on an SSH server, uploaded without asking) and its path pasted; removed when the terminal closes. Off, the key does nothing |
| Ctrl+V pastes text | on | Ctrl+V pastes the clipboard's text; with no text on it the key goes to the program. Off, Ctrl+V always goes to the program |
When rCommander ends - closed, after a crash or from the task manager - its terminals end with
it; nothing stays behind in the process list. Closing takes at most about three seconds, also
while a network share does not answer or an assistant's MCP request is still open; after that
the program file can be replaced. The one process that may stay is an rcommander mcp that an
MCP client started on its own: it belongs to that client and ends with it.
Font and size: Settings, page Appearance (Terminal font, Terminal font size).
- SSH terminals for quick connections (Ctrl+N); today a terminal opens on a saved connection only.
- An SSH terminal that follows the panel's folder and back, as local shells do.
Getting started
Using rCommander
Developing
Reference