MCPcopy Create free account
hub / github.com/BuddySirJava/SSH-Studio / duplicate_host

Method duplicate_host

src/ui/host_list.py:224–235  ·  view source on GitHub ↗

Duplicate the selected host.

(self, original_host: SSHHost = None)

Source from the content-addressed store, hash-verified

222 self.select_host(new_host)
223
224 def duplicate_host(self, original_host: SSHHost = None):
225 """Duplicate the selected host."""
226 if original_host is None:
227 original_host = self._get_selected_host()
228 if original_host is not None:
229 duplicated_host = self._duplicate_host(original_host)
230
231 self.emit("host-added", duplicated_host)
232
233 self.filter_hosts(self.current_filter)
234
235 self.select_host(duplicated_host)
236
237 def delete_host(self, host_to_delete: SSHHost = None):
238 """Delete the selected host."""

Callers 2

_on_duplicate_clickedMethod · 0.80

Calls 4

_get_selected_hostMethod · 0.95
_duplicate_hostMethod · 0.95
filter_hostsMethod · 0.95
select_hostMethod · 0.95

Tested by

no test coverage detected