summaryrefslogtreecommitdiff
path: root/bin/dmenu_ssh
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-06-21 10:44:50 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-06-21 10:46:21 -0700
commit134984230ac68c0bf5595ffbf4c2b1198b975803 (patch)
tree7cd2ec475952c69babfa27eaf0a85e743f0f1493 /bin/dmenu_ssh
parent37cc1fdbc9789e129afc5f3d523240446625463b (diff)
downloaddotfiles-134984230ac68c0bf5595ffbf4c2b1198b975803.tar.gz
new ssh-and-tmux and ssh-and-tmux-term and some connecting up
Diffstat (limited to 'bin/dmenu_ssh')
-rwxr-xr-xbin/dmenu_ssh7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/dmenu_ssh b/bin/dmenu_ssh
new file mode 100755
index 00000000..c833166b
--- /dev/null
+++ b/bin/dmenu_ssh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+host=$(perl -wlne'/^Host\s+(\S+)/ and !/\*/ and print $1' $HOME/.ssh/config \
+ | dmenu -p "ssh to tmux on host" "$@")
+if [ -n "$host" ]; then
+ ssh-and-tmux-term "$host"
+fi