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 #!/bin/bash
set -x tmate -S /tmp/$USER.$USER.tmate new-session -s james -n james
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"

View File

@ -324,8 +324,8 @@ Once our keys are available to us we can clone down our dotfiles and get back to
# Replace the osc52 command with xsel # Replace the osc52 command with xsel
sed -i -e 's/osc52.sh/xsel -i -b/g' /usr/local/share/emacs/site-lisp/bin/osc52-tmate.sh sed -i -e 's/osc52.sh/xsel -i -b/g' /usr/local/share/emacs/site-lisp/bin/osc52-tmate.sh
# Fix the ob-tmate bug # Provide custom xclipboard functions
#sed -i -e 's/ob-session dir))/ob-session session-dir))/g' /usr/local/share/emacs/site-lisp/spacemacs/elpa/26.3/develop/ob-tmate-20200206.109/ob-tmate.el # https://github.com/syl20bnr/spacemacs/issues/2222
#+END_SRC #+END_SRC