Still no illegible commit message, as usual

This commit is contained in:
Geoffrey Frogeye 2016-12-11 23:12:43 +01:00
parent 150301d166
commit 29cb924997
3 changed files with 9 additions and 2 deletions

View file

@ -1,6 +1,9 @@
#!/bin/sh
if [ "$1" == 'root' ]; then
a=" (root)"
b="sudo "
b="sudo -E "
fi
machine=$(cat ~/.ssh/config | grep '^Host ' | cut -d ' ' -f 2 | grep -v '*' | sort | $HOME/.config/i3/dmenu_cmd -p "SSH$a to ")
if [ ! -z $machine ]; then
xterm -e "ssh $machine -t '${b}bash --login'"
fi
xterm -e "ssh $(cat ~/.ssh/config | grep '^Host ' | cut -d ' ' -f 2 | grep -v '*' | sort | $HOME/.config/i3/dmenu_cmd -p "SSH$a to ") -t '${b}bash --login'"