dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit 30ed0f2f50e3989bd2c848b47396448a423792e8
parent 9b2557e9ed3c8705b8080180f8cbc68a519e1bf0
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 29 Mar 2021 17:13:16 +0200

irc.sh: use mosh(1) if available, otherwise use ssh(1)

Diffstat:
M.local/bin/irc.sh | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/.local/bin/irc.sh b/.local/bin/irc.sh @@ -1,2 +1,9 @@ #!/bin/sh -ssh -t irc@adamsgaard.dk "tmux -u new-session -A -D -s irc irssi" +host="irc@adamsgaard.dk" +cmd="tmux -u new-session -A -D -s irc irssi" + +if command -v mosh >/dev/null 2>&1; then + mosh irc@adamsgaard.dk -- $cmd +else + ssh -t irc@adamsgaard.dk "$cmd" +fi