Docs: Mention close_shared_ssh_connections in ssh kitten config docs

This commit is contained in:
pagedown 2022-04-30 16:54:46 +08:00
parent 2b58316c64
commit 6c1f20bb27
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB
2 changed files with 7 additions and 1 deletions

View File

@ -136,6 +136,8 @@ Within a single kitty instance, all connections to a particular server can be
shared. This reduces startup latency for subsequent connections and means that
you have to enter the password only once. Under the hood, it uses SSH
ControlMasters and these are automatically cleaned up by kitty when it quits.
You can map a shortcut to :ac:`close_shared_ssh_connections` to disconnect all
active shared connections.
''')
opt('askpass', 'unless-set', choices=('unless-set', 'ssh', 'native'), long_text='''

View File

@ -2245,7 +2245,11 @@ class Boss:
output = '\n'.join(f'{k}={v}' for k, v in os.environ.items())
self.display_scrollback(w, output, title=_('Current kitty env vars'), report_cursor=False)
@ac('debug', 'Close all shared SSH connections')
@ac('debug', '''
Close all shared SSH connections
See :opt:`share_connections <kitten-ssh.share_connections>` for details.
''')
def close_shared_ssh_connections(self) -> None:
cleanup_ssh_control_masters()