summaryrefslogtreecommitdiff
path: root/json-rpc-shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'json-rpc-shell.c')
-rw-r--r--json-rpc-shell.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/json-rpc-shell.c b/json-rpc-shell.c
index 8bf50bd..a76ac1a 100644
--- a/json-rpc-shell.c
+++ b/json-rpc-shell.c
@@ -3049,6 +3049,11 @@ main (int argc, char *argv[])
char *endpoint = NULL;
parse_program_arguments (&g_ctx, argc, argv, &origin, &endpoint);
+ g_ctx.input = input_new ();
+ g_ctx.input->user_data = &g_ctx;
+ g_ctx.input->on_input = process_input;
+ g_ctx.input->on_run_editor = run_editor;
+
init_colors (&g_ctx);
load_configuration (&g_ctx);
@@ -3110,11 +3115,6 @@ main (int argc, char *argv[])
data_home = xstrdup_printf ("%s/.local/share", home);
}
- g_ctx.input = input_new ();
- g_ctx.input->user_data = &g_ctx;
- g_ctx.input->on_input = process_input;
- g_ctx.input->on_run_editor = run_editor;
-
char *history_path =
xstrdup_printf ("%s/" PROGRAM_NAME "/history", data_home);
(void) g_ctx.input->vtable->load_history (g_ctx.input, history_path, NULL);