Added start session script.
This commit is contained in:
15
start-session.sh
Executable file
15
start-session.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -x
|
||||||
|
export ALTERNATE_EDITOR=""
|
||||||
|
BASE=$(basename $1)
|
||||||
|
tmate -S /tmp/${USER}.${BASE}.iisocket new-session \
|
||||||
|
-A -s $USER -n emacs \
|
||||||
|
"tmate wait tmate-ready \
|
||||||
|
&& TMATE_CONNECT=\
|
||||||
|
\$(tmate display -p '#{tmate_ssh} # ${USER}.${BASE} # $(date) # #{tmate_web}') \
|
||||||
|
; echo \$TMATE_CONNECT \
|
||||||
|
; (echo \$TMATE_CONNECT | xclip -i -sel p -f | xclip -i -sel c )2>/dev/null \
|
||||||
|
; echo Share the above with your friends and hit enter here when done? \
|
||||||
|
; read ; \
|
||||||
|
emacsclient -s $BASE --tty $1 2>&1"
|
||||||
|
|
||||||
Reference in New Issue
Block a user