riot: shortcuts i,x,j

This commit is contained in:
xiongdian.me 2023-08-01 23:51:29 +08:00
parent 2ecdf945a9
commit dbba66ccd0

View File

@ -29,6 +29,14 @@ get_server_meta() {
RET_JUMP_SERVER="" # optional RET_JUMP_SERVER="" # optional
# body # body
local remote="$1" local remote="$1"
# shortcuts
if [[ "$remote" == "i" ]]; then
remote="sir0.ibd"
elif [[ "$remote" == "x" ]]; then
remote="bj1.ibd"
elif [[ "$remote" == "j" ]]; then
remote="sir0.ibd:36122"
fi
# if in the form user@... # if in the form user@...
if [[ "$remote" == *@* ]]; then if [[ "$remote" == *@* ]]; then
RET_USERNAME=${remote%%@*} RET_USERNAME=${remote%%@*}