Commit 4642c1ae25fe5a41bb7a8f212d8a0521a85633d9

Nick Gasson 2014-01-06T11:19:36

Add "emacs" to unsupported_term The Emacs terminal emulator has its own line editing and does not behave correctly in raw mode. Without this programs using linenoise will hang when run inside an Emacs shell.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/linenoise.c b/linenoise.c
index c4e3118..728bdba 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -108,7 +108,7 @@
 
 #define LINENOISE_DEFAULT_HISTORY_MAX_LEN 100
 #define LINENOISE_MAX_LINE 4096
-static char *unsupported_term[] = {"dumb","cons25",NULL};
+static char *unsupported_term[] = {"dumb","cons25","emacs",NULL};
 static linenoiseCompletionCallback *completionCallback = NULL;
 
 static struct termios orig_termios; /* In order to restore at exit.*/