gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/completion.c
diff options
context:
space:
mode:
Diffstat (limited to 'completion.c')
-rw-r--r--completion.c 16
1 files changed, 13 insertions, 3 deletions
diff --git a/completion.c b/completion.c
index 3a617728..35381b07 100644
--- a/completion.c
+++ b/completion.c
@@ -5,16 +5,20 @@
#include <stdlib.h>
#include <readline/readline.h>
#include <readline/history.h>
-#include <lua.h>
-
+#include <sys/wait.h>
+#include <unistd.h>
#include "completion.h"
#include "gsl-shell.h"
+#include "edit_functions.h"
+//lua_State *globalL = NULL;
static char *my_generator (const char *text, int state);
+void bind_keys(); //will bind the keys to their appropiate functions
+int launch_editor(); //will launch the editor
void initialize_readline()
{
-
+ bind_keys();
rl_completion_entry_function = my_generator;
rl_basic_word_break_characters = " \t\n\"'~><=*+-/;,|[{(";
}
@@ -136,3 +140,9 @@ char *my_generator (const char *text, int state)
lua_pop (L, 1);
return NULL;
}
+
+void bind_keys()
+{
+ rl_bind_key(0x05,launch_editor); // ctrl+e will launch the editor
+}
+
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月12日 11:47:43 +0000

AltStyle によって変換されたページ (->オリジナル) /