summaryrefslogtreecommitdiff
path: root/config/essentials/shell/functions.sh
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-18 11:10:41 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-18 11:10:41 +0200
commit8ab21b6fe5e6e2f93b6228c0bc262fa313a4c60d (patch)
treec2b82df824e2b938eb1222355096db8fd9451ecd /config/essentials/shell/functions.sh
parent84dc4d81c70af431c786b5080307d6bb87a0162e (diff)
add vis config
Diffstat (limited to 'config/essentials/shell/functions.sh')
-rw-r--r--config/essentials/shell/functions.sh14
1 files changed, 14 insertions, 0 deletions
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"
+}
+