mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 08:17:01 +08:00
riot: ssh support instant command
This commit is contained in:
parent
deec5c9b05
commit
37abe68d1f
|
@ -149,13 +149,13 @@ prepare_ssh_cmd() {
|
||||||
else
|
else
|
||||||
local port_param='-p'
|
local port_param='-p'
|
||||||
fi
|
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
|
# ssh
|
||||||
run_ssh()
|
run_ssh()
|
||||||
{
|
{
|
||||||
local cmd="$(prepare_ssh_cmd $1)"
|
local cmd="$(prepare_ssh_cmd $@)"
|
||||||
fmt_note "-->" $cmd
|
fmt_note "-->" $cmd
|
||||||
eval_or_echo $cmd
|
eval_or_echo $cmd
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@ router() {
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
ssh|"" )
|
ssh|"" )
|
||||||
run_ssh
|
run_ssh ssh "${@:3}"
|
||||||
;;
|
;;
|
||||||
zssh )
|
zssh )
|
||||||
run_ssh zssh
|
run_ssh zssh
|
||||||
|
|
Loading…
Reference in New Issue
Block a user