changeset 651:a9169eb43233

Added support for WSL.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Wed, 15 May 2019 16:31:33 +0300
parents 0c73b52edf9a
children 58c2aea237ad
files emacs/e
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/emacs/e	Tue Feb 26 10:29:25 2019 +0200
+++ b/emacs/e	Wed May 15 16:31:33 2019 +0300
@@ -24,8 +24,8 @@
 
 emacs_cmd="-a emacs"
 if [ -n "$COMSPEC" ]; then
-    # We probably under Windows. Don't try to start Emacs as fallback.
-    emacs_cmd=
+  # We probably under Windows. Don't try to start Emacs as fallback.
+  emacs_cmd=
 fi
 
 case ${0##*/} in
@@ -36,7 +36,11 @@
 esac
 
 if [ -n "$COMSPEC" ]; then
-    exec emacsclient-w32 $args -- "$@"
+  exec emacsclient-w32 $args -- "$@"
+fi
+read os </proc/sys/kernel/osrelease || :
+if [[ "$os" == *Microsoft ]]; then
+  exec emacsclient-w32.exe $args -- "$@"
 fi
 
 f=`readlink -f "$1"`