From ae1405d7c0b7095f0176aab9a290b70c69e31760 Mon Sep 17 00:00:00 2001 From: pancake Date: Mon, 17 Oct 2016 14:38:43 +0200 Subject: [PATCH] Handle ~?* to make travis happy --- libr/core/cmd.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/libr/core/cmd.c b/libr/core/cmd.c index 820a6fc1d1..e682930838 100644 --- a/libr/core/cmd.c +++ b/libr/core/cmd.c @@ -921,10 +921,12 @@ static int cmd_resize(void *data, const char *input) { static int cmd_visual(void *data, const char *input) { RCore *core = (RCore*) data; - if (core->http_up) + if (core->http_up) { return false; - if (!r_config_get_i (core->config, "scr.interactive")) + } + if (!r_config_get_i (core->config, "scr.interactive")) { return false; + } return r_core_visual ((RCore *)data, input); } @@ -1485,11 +1487,14 @@ static int r_core_cmd_subst_i(RCore *core, char *cmd, char *colon) { core->oobi = NULL; ptr = strstr (cmd, "?*"); - if (ptr && !ptr[2]) { - ptr[1] = 0; - if (*cmd != '#' && strlen (cmd) < 5) { - recursive_help (core, cmd); - return 0; + if (ptr && !ptr[2] && ptr > cmd) { + char *prech = ptr - 1; + if (*prech != '~') { + ptr[1] = 0; + if (*cmd != '#' && strlen (cmd) < 5) { + recursive_help (core, cmd); + return 0; + } } } @@ -1677,6 +1682,7 @@ next2: } else { ptr = NULL; } + core->tmpseek = ptr? true: false; if (ptr) { char *f, *ptr2 = strchr (ptr+1, '!');