Skip to content

File Explorer

Eric Kochen edited this page Apr 2, 2026 · 3 revisions

Press F on any host to open a split-screen file explorer. Your local filesystem on the left, the remote server on the right. Navigate directories, select files and copy them between machines with Enter. No more constructing scp paths (like scp user@host:/var/log/app.log ./) from memory.

How it works

The file explorer is a dual-pane browser. The local pane uses std::fs::read_dir() to list entries. The remote pane runs ls -lhAL over SSH and parses the output to extract file names, sizes, permissions and modification dates. The -A flag shows hidden files (dotfiles) except . and ... The -L flag dereferences symlinks (symbolic links, shortcuts to other files) so their target type is shown directly (broken symlinks are omitted since they cannot be transferred). The -h flag shows human-readable file sizes (e.g. 4.0M instead of 4194304).

File transfer uses scp -F <config_path> (secure copy, the standard SSH file transfer tool) under the hood, passing your full SSH config so ProxyJump chains (bastion/jump hosts), identity files (SSH keys) and other directives all apply transparently.

Sorting

Both panes support three sort modes (cycle with s):

  • Name (default): directories first, then alphabetical (case-insensitive)
  • Date (newest first): directories first, then by modification time descending
  • Date ascending: directories first, then by modification time ascending. Unknown dates sort to the end

Keybindings

Key Action
Tab Switch pane (local / remote)
j / k Navigate up and down
Enter Open directory or copy selected file(s)
Backspace Go up one directory
Ctrl+Space Select / deselect file
Ctrl+A Select all / deselect all
. Toggle hidden files
s Cycle sort mode (name / date / date asc)
R Refresh both panes
PgDn / PgUp Page down / up
Esc Close file explorer

Selecting and copying

  1. Navigate to the file(s) you want to copy
  2. Select with Ctrl+Space (or Ctrl+A for all)
  3. Press Enter to initiate the copy
  4. A confirmation dialog shows the files and transfer direction before anything moves

You can copy entire directories. Paths are remembered per host so you pick up where you left off the next time you open the explorer for that host.

State tracking

The explorer tracks several pieces of state per session:

  • Active pane: which side has focus (local or remote)
  • Selected files: independent selection sets for local and remote
  • Paths per host: stored in memory so opening the explorer again restores your last position
  • Connection recording: the first remote navigation is recorded in connection history (once per session)

Performance tip

Each directory navigation opens a new SSH connection to run ls. To speed this up, add connection multiplexing (reusing a single SSH connection for multiple operations instead of opening a new one each time) to your SSH config:

Host *
    ControlMaster auto
    ControlPath ~/.ssh/sockets/%r@%h-%p
    ControlPersist 600

This reuses a single connection for file browser navigation. Make sure the sockets directory exists: mkdir -p ~/.ssh/sockets.

Note: snippet execution explicitly disables ControlMaster to keep each run isolated from persistent connections.

Clone this wiki locally