From 8ab21b6fe5e6e2f93b6228c0bc262fa313a4c60d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 18 Jun 2024 11:10:41 +0200 Subject: add vis config --- config/essentials/shell/functions.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'config/essentials/shell/functions.sh') diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 945b716..976db1e 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -371,3 +371,17 @@ ffconcat () { ffmpeg -y -f concat -safe 0 -i $tmp -c copy "$1" rm $tmp } + +# wrap ssh and add key if exists +ssh() { + if [ "$#" -gt 1 ] + then + /usr/bin/ssh $@ + return + fi + + grep -E "Host\s+$1" $HOME/.ssh/config > /dev/null 2>&1 && + keyadd "$1" > /dev/null 2>&1 + /usr/bin/ssh "$1" +} + -- cgit v1.2.3