"osh" for ssh+mosh

This commit is contained in:
2026-07-04 13:35:42 +02:00
parent 50898e30aa
commit 3018e057d7
+8
View File
@@ -166,6 +166,14 @@ colordiff() {
cat "$file2" | git diff --no-prefix $gitarg --no-index "$file1" -
}
osh() {
local DEST="$1"
# TODO: loop to re-establish connection in case of network drop.
# Kill the loop after mosh (below) finishes.
ssh -O check "$DEST" 2>/dev/null || ssh -A -f -N -o ControlPersist=yes "$DEST"
mosh "$@"
}
alias backup-home-explore='eval "ncdu $(grep -A1 -- --exclude $HOME/bin/backup-home | tr -d \|)"'
# stderr redirect for if direnv is missing