forked from github-starred/komodo
km ssh <SERVER> [COMMAND] -n [NAME]
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user