Skip to content

Commit

Permalink
Fix #17194 - Fix 'e scr.pager=..' to set the internal pager ##cons
Browse files Browse the repository at this point in the history
  • Loading branch information
radare authored and as0ler committed May 30, 2023
1 parent bb644b3 commit eef7e3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libr/config/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ static void eval_config_string(RConfig *cfg, char *name) {
(void) r_config_set (cfg, name, eq);
}
} else {
if (r_str_endswith (name, ".")) {
if (r_str_endswith (name, ".") && !r_str_endswith (name, "..")) {
r_config_list (cfg, name, 0);
} else {
const char *v = r_config_get (cfg, name);
Expand Down
2 changes: 1 addition & 1 deletion libr/core/cconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -2405,7 +2405,7 @@ static bool cb_pager(void *user, void *data) {
RCore *core = (RCore *) user;
RConfigNode *node = (RConfigNode *) data;
if (*node->value == '?') {
eprintf ("scr.pager must be '..' for internal less, or the path to a program in $PATH\n");
R_LOG_INFO ("scr.pager must be '..' for internal less, or the path to a program in $PATH");
return false;
}
/* Let cons know we have a new pager. */
Expand Down
2 changes: 1 addition & 1 deletion libr/core/cmd_eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ static int cmd_eval(void *data, const char *input) {
break;
case '.': // "e "
case ' ': // "e "
if (r_str_endswith (input, ".")) {
if (r_str_endswith (input, ".") && !r_str_endswith (input, "..")) {
r_config_list (core->config, input + 1, 0);
} else {
// XXX we cant do "e cmd.gprompt=dr=", because the '=' is a token, and quotes dont affect him
Expand Down

0 comments on commit eef7e3e

Please sign in to comment.