Corrected session start script.

This commit is contained in:
2020-04-11 14:49:50 +12:00
parent 05635d9ddc
commit c573ab0c70
2 changed files with 3 additions and 16 deletions

View File

@ -1,15 +1,2 @@
#!/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"
tmate -S /tmp/$USER.$USER.tmate new-session -s james -n james