Skip to content

Commit 3d3b15b

Browse files
✨ feat(oc): Allow to manage multiple sessions.
1 parent 1195598 commit 3d3b15b

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.bin/oc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
#!/usr/bin/env sh
22

3-
ssh "$@" -t screen -x -R -S oc
3+
if [ "$#" -lt 1 ] ; then
4+
>&2 echo "usage: $0 <host> [key] [ssh arg]*"
5+
>&2 echo
6+
>&2 echo "example: $0 example.com default"
7+
exit 127
8+
fi
9+
10+
host="${1}"
11+
shift
12+
13+
key="${1:-default}"
14+
if [ "$#" -ge 1 ] ; then
15+
shift
16+
fi
17+
18+
ssh "${host}" "$@" -t screen -x -R -S "oc-${key}"

0 commit comments

Comments
 (0)