aboutsummaryrefslogtreecommitdiff
path: root/jim-history.c
diff options
context:
space:
mode:
Diffstat (limited to 'jim-history.c')
-rw-r--r--jim-history.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/jim-history.c b/jim-history.c
index e1cc1d4..076fd0b 100644
--- a/jim-history.c
+++ b/jim-history.c
@@ -41,6 +41,12 @@ static int history_cmd_setcompletion(Jim_Interp *interp, int argc, Jim_Obj *cons
return JIM_OK;
}
+static int history_cmd_sethints(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
+{
+ Jim_HistorySetHints(interp, Jim_Length(argv[0]) ? argv[0] : NULL);
+ return JIM_OK;
+}
+
static int history_cmd_load(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
Jim_HistoryLoad(Jim_String(argv[0]));
@@ -95,6 +101,13 @@ static const jim_subcmd_type history_command_table[] = {
1,
/* Description: Sets an autocompletion callback command, or none if "" */
},
+ { "hints",
+ "command",
+ history_cmd_sethints,
+ 1,
+ 1,
+ /* Description: Sets a hints callback command, or none if "" */
+ },
{ "getline",
"prompt ?varname?",
history_cmd_getline,