snasp; doll: $2 for the name

This commit is contained in:
xiongdian.me 2022-11-15 18:16:43 +08:00
parent f2b4faacee
commit 1e992797f9
2 changed files with 2 additions and 1 deletions

View File

@ -90,6 +90,7 @@ alias "p114"='ping 114.114.114.114'
alias "p666"='ping6 2001:da8::666' alias "p666"='ping6 2001:da8::666'
sibd() { ssh -p 12022 root@$1${1:+.}ibd.ink } sibd() { ssh -p 12022 root@$1${1:+.}ibd.ink }
sob() { ssh -p 24022 root@$1${1:+.}ob.ac.cn } sob() { ssh -p 24022 root@$1${1:+.}ob.ac.cn }
snasp() { ssh -o ProxyJump="ssh@nasp.ob.ac.cn:36022" dictxiong@$1 }
case $(bash "$DOTFILES/tools/common.sh" get_os_type) in case $(bash "$DOTFILES/tools/common.sh" get_os_type) in
macos ) alias l='ls -lAGh -D "%y-%m-%d %H:%M"' ;; macos ) alias l='ls -lAGh -D "%y-%m-%d %H:%M"' ;;
* ) alias l='ls -lAGh --time-style="+%y-%m-%d %H:%M"' ;; * ) alias l='ls -lAGh --time-style="+%y-%m-%d %H:%M"' ;;

View File

@ -21,5 +21,5 @@ if [[ -z "$IMAGE" ]]; then
fmt_fatal "image not found" fmt_fatal "image not found"
else else
echo "--> ${IMAGE_META[@]}" echo "--> ${IMAGE_META[@]}"
$SUDO docker run -itd $IMAGE sh $SUDO docker run ${2:+"--name"} $2 -itd $IMAGE sh
fi fi