Improve emacs remote script a bit

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2021-06-16 07:32:26 +02:00
parent 591399f5a3
commit 5301c8defb
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -26,7 +26,9 @@ else
fi
emacsclient() {
if [[ -e "$HOME/.ssh/emacs-server" ]] && [[ -z ${INSIDE_EMACS+x} ]] ; then
if [[ -e "$HOME/.ssh/emacs-server" ]] && \
nc -Uz "$HOME/.ssh/emacs-server" && \
[[ ! -z ${INSIDE_EMACS+x} ]] ; then
params=()
sudo=0
nowait=0