Adding mt function to zsh functions.zsh

allows mosh and tmux to an arbitrary host
This commit is contained in:
Andrew Davidson 2020-11-15 07:26:41 -08:00
parent ea489444b6
commit 5f169f6acd
Signed by: amd
GPG key ID: 17AF8F2A49CF25C6

View file

@ -34,6 +34,20 @@ extract() {
fi
}
# create an archive of a list of files, compress the archive, and encrypt the compressed archive
function archive-and-encrypt {
echo -n "Enter desired output filename: "
read filename
tar cJ $1 | \
gpg -q -r andrew@amdavidson.com -s -e -o "$filename.tar.xz.gpg"
}
# run mosh and tmux to a specific host
function mt {
mosh $1 -- tmux new-session -A -s main
}
# blank-chrome
function blank-chrome {
if [ "$@" ]; then