Skip to main content

Module conn

Module conn 

Source
Expand description

A pane’s connection, parsed from its connection block meta.

  • local (or empty): this machine.
  • wsl://<distro>: a WSL distribution on this Windows machine.
  • anything else: an SSH destination as the user writes it for ssh: host, user@host, user@host:port, or a Host alias from ~/.ssh/config. The system ssh resolves it (spec §3.1).

The SSH destination ends up in an ssh argv, so it is validated here: one starting with - would be read by ssh as an option (-oProxyCommand=... runs a local command), and whitespace or control characters have no place in a destination. The launch also puts -- before it; this is the first line.

Structs§

SshDest
A validated SSH destination: host, user@host or user@host:port.

Enums§

ConnTarget
Where a pane’s shell runs.

Constants§

MAX_CONN_NAME_LEN 🔒
Longest connection name accepted: a hostname is at most 253 characters, plus a user and a port.
SHELL_CHARS 🔒
Characters that only mean something to a shell, refused in an SSH destination (see parse_ssh).
WSL_PREFIX
Prefix of a WSL connection name.

Functions§

parse_port 🔒
parse_ssh 🔒
parse_wsl 🔒
same_connection
Whether two connection names mean the same place: "" and local do, and WSL distro names compare without case, as Windows treats them.
split_port 🔒