km ssh <SERVER> [COMMAND] -n [NAME]

This commit is contained in:
mbecker20
2025-10-21 23:55:36 -07:00
parent e890b1f675
commit bd79d0f1e0
2 changed files with 6 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ use tokio_tungstenite::tungstenite;
pub async fn handle(
Ssh {
server,
terminal,
name,
command,
recreate,
}: &Ssh,
@@ -76,7 +76,7 @@ pub async fn handle(
client
.write(CreateTerminal {
server: server.to_string(),
name: terminal.to_string(),
name: name.to_string(),
command: command.clone(),
recreate: if *recreate {
TerminalRecreateMode::Always
@@ -87,7 +87,7 @@ pub async fn handle(
.await?;
let (mut ws_write, mut ws_read) = client
.connect_terminal_websocket(server, terminal)
.connect_terminal_websocket(server, name)
.await?
.split();

View File

@@ -7,9 +7,9 @@ pub struct Ssh {
/// Defaults to Periphery default.
pub command: Option<String>,
/// The terminal (name) to connect to. Default: `ssh`
#[arg(long, short = 't', default_value_t = String::from("ssh"))]
pub terminal: String,
/// The terminal name to connect to. Default: `ssh`
#[arg(long, short = 'n', default_value_t = String::from("ssh"))]
pub name: String,
/// Force fresh terminal to replace existing one.
#[arg(long, short = 'r', default_value_t = false)]