From 5f169f6acd8b42a81e16567d3c49b118906cab84 Mon Sep 17 00:00:00 2001 From: Andrew Davidson Date: Sun, 15 Nov 2020 07:26:41 -0800 Subject: [PATCH] Adding mt function to zsh functions.zsh allows mosh and tmux to an arbitrary host --- zsh/.zsh/functions.zsh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/zsh/.zsh/functions.zsh b/zsh/.zsh/functions.zsh index 108c557..3dad8cf 100644 --- a/zsh/.zsh/functions.zsh +++ b/zsh/.zsh/functions.zsh @@ -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