Feature · Navigate

Terminal sync — the panel and the shell always agree

cwdio keeps the file panel and the embedded terminal on the same folder both ways: navigate and the shell follows; cd and the panel moves. PowerShell, cmd, bash, WSL.

Default shortcut: Ctrl+` · Ctrl+Shift+` Updated 15 August 2026 View as Markdown

cwdio with a terminal open below the file panels. The terminal prompt reads C:\cwdio-demo\aurora-web\src, the same folder the active panel is showing, and a git status command has printed a modified and an untracked file.
The terminal opened in the folder the panel was already showing — nobody typed a path. Its tab carries the folder's name.

Every other file manager makes you tell it where you are twice — once by clicking, once by typing. cwdio keeps the two in step, in both directions, and that is the whole idea behind the name: cwd is where you are, io is the work.

What it does

  • Panel → terminal. Navigate the active panel — double-click a folder, press Backspace to go up, jump with Ctrl+J — and the idle terminal bound to that pane runs a cd to the same folder. Its tab title updates to the folder’s name.
  • Terminal → panel. Type cd src in a focused terminal and the active panel moves to src. Run a script that ends somewhere else and the panel is there when it finishes.
  • Many terminals, one each. Open a terminal per pane; each tracks its own folder. Ctrl+Shift+` opens another session; the terminal group’s picker chooses the shell.
  • Remote too. On an SFTP connection the pane’s terminal is an SSH shell on the same connection, and the sync works between the remote folder and the remote prompt.

How to use it

  1. Press Ctrl+` (or Ctrl+O) to show the terminal. It opens in the folder the active panel is already showing — nobody types a path.
  2. Move around in the panel; watch the prompt follow. Type cd .. in the terminal; watch the panel follow.
  3. Need the current file in a command? Ctrl+Enter inserts the cursor file’s name into the command line and Ctrl+Shift+Enter its full path — the Total Commander habit, kept.

There is also an always-visible command line under the panels (the Midnight Commander model): type a command and it runs in the active terminal session, in the panel’s folder.

Which shells

The profile picker is not a static list. cwdio discovers the shells you actually have, the way Windows Terminal does: PowerShell and Windows PowerShell, Command Prompt, one profile per installed WSL distribution, Git Bash where Git for Windows is installed, Visual Studio developer shells where Visual Studio is, and any launchable profile from Windows Terminal’s own settings.json and fragment extensions. Discovery is best-effort and cached; if a source is missing you simply get the base three.

The two-way sync relies on the shell reporting its directory through OSC 7 — the same escape sequence modern terminals use for shell integration. cwdio wires that up for PowerShell, cmd and bash automatically. A shell that does not report (a bare python, say) still runs; it just cannot move the panel.

What it deliberately does not do

  • It never cds a busy terminal. If a command is running, cwdio does not interrupt it with a cd; the sync resumes once the shell is idle again. That is what keeps a long-running job from being interrupted by a click, and keeps the two directions from chasing each other in a loop.
  • It does not detach a terminal into a separate OS window. Terminals are dock panels — you can drag them beside, below or on top of the file panels, but they stay in the cwdio window.
  • The terminal owns its own keys. When the terminal has focus, the shell sees your keystrokes; the file manager’s shortcuts resume the moment focus returns to a panel.

Questions

Which shells does the sync work with?

PowerShell (7 and Windows PowerShell), Command Prompt and bash — including Git Bash and the shells inside WSL distributions — announce their working directory to cwdio through OSC 7 shell integration, so the sync is two-way for all of them. Any other shell still runs in the terminal; it just does not report its folder, so only the panel-to-terminal direction works.

Does the terminal follow every panel or just one?

Each terminal is bound to one pane. Open one terminal per pane and each tracks its own folder; the active terminal is the one the active panel drives.

Can I turn the sync off?

Yes. View ▸ Sync terminal to folder toggles it; it is on by default. With it off, the terminal is an ordinary embedded terminal that stays where you left it.

Does it work over SSH?

Yes. When an SFTP connection is open, the terminal for that pane is a real SSH shell on the same connection, and the same working-directory sync applies between the remote panel and the remote shell.