From 37abe68d1fa76d4a8ece18fa455a0f858e3645b4 Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Mon, 21 Aug 2023 18:36:44 +0800 Subject: [PATCH] riot: ssh support instant command --- scripts/riot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/riot b/scripts/riot index 376c63d..218b392 100755 --- a/scripts/riot +++ b/scripts/riot @@ -149,13 +149,13 @@ prepare_ssh_cmd() { else local port_param='-p' fi - echo "$ssh_bin ${PORT:+$port_param} $PORT $SSH_OPTIONS $SCP_SRC $USERNAME${USERNAME:+@}$SERVER $SCP_DST" + echo "$ssh_bin ${PORT:+$port_param} $PORT $SSH_OPTIONS $SCP_SRC $USERNAME${USERNAME:+@}$SERVER $SCP_DST ${@:2}" } # ssh run_ssh() { - local cmd="$(prepare_ssh_cmd $1)" + local cmd="$(prepare_ssh_cmd $@)" fmt_note "-->" $cmd eval_or_echo $cmd } @@ -219,7 +219,7 @@ router() { exit ;; ssh|"" ) - run_ssh + run_ssh ssh "${@:3}" ;; zssh ) run_ssh zssh