mirror of
https://github.com/troglobit/editline.git
synced 2025-12-16 02:54:46 +08:00
Add support for disabling default SIGINT and EOF behavior.
This patch adds support for `--disable-eof` and `--disable-sigint` to the Editline configure script. With either of these two switches the `tty_special()` function bypasses the special TTY checks making it possible to bind Ctrl-C and Ctrl-D to custom callbacks. This can be useful if you want to emulate a Cisco style CLI rather than traditional UNIX. The user can of course also redefine the VINTR and VEOF special terminal control characters, but these configure script switches may be easier to use for some. Also, the CLI example has been updated to bind Ctrl-D, Ctrl-C and Ctrl-Z for testing purposes. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
10
configure.ac
10
configure.ac
@@ -64,8 +64,16 @@ AC_ARG_ENABLE(arrow-keys,
|
||||
[AS_HELP_STRING([--disable-arrow-keys], [Disable ANSI arrow keys.])],
|
||||
, AC_DEFINE(CONFIG_ANSI_ARROWS, 1, [Define to include ANSI arrow keys support.]))
|
||||
|
||||
AC_ARG_ENABLE(eof,
|
||||
[AS_HELP_STRING([--disable-eof], [Disable default EOF (Ctrl-D) behavior.])],
|
||||
, AC_DEFINE([CONFIG_EOF], 1, [Define to enable EOF (Ctrl-C) key.]))
|
||||
|
||||
AC_ARG_ENABLE(sigint,
|
||||
[AS_HELP_STRING([--disable-sigint], [Disable default SIGINT (Ctrl-C) behavior.])],
|
||||
, AC_DEFINE([CONFIG_SIGINT], 1, [Define to enable SIGINT (Ctrl-C) key.]))
|
||||
|
||||
AC_ARG_ENABLE(sigstop,
|
||||
[AS_HELP_STRING([--enable-sigstop], [Enable SIGSTOP key.])],
|
||||
[AS_HELP_STRING([--enable-sigstop], [Enable SIGSTOP (Ctrl-Z) behavior.])],
|
||||
AC_DEFINE([CONFIG_SIGSTOP], 1, [Define to enable SIGSTOP (Ctrl-Z) key.]))
|
||||
|
||||
AC_ARG_ENABLE(terminal-bell,
|
||||
|
||||
Reference in New Issue
Block a user