Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change pager to builtin pager #17194

Closed
karliss opened this issue Jul 1, 2020 · 1 comment
Closed

Can't change pager to builtin pager #17194

karliss opened this issue Jul 1, 2020 · 1 comment
Assignees

Comments

@karliss
Copy link
Contributor

karliss commented Jul 1, 2020

Work environment

Questions Answers
OS/arch/bits (mandatory) Arch Linux
File format of the file you reverse (mandatory) ELF
Architecture/bits of the file (mandatory) 64
r2 -v full output, not truncated (mandatory) radare2 4.5.0-git 26371 @ linux-x86-64 git.4.4.0-361-g0b2276e2b commit: 0b2276e build: 2020-07-01__19:53:30

Expected behavior

scr.pager can be set to '..' as suggested by help message.

Actual behavior

Trying to change pager to .. gets ignored. Tested both with new and old shell.

Steps to reproduce the behavior

[0x00005b20]> e? scr.pager
           scr.pager: System program (or '..') to use when output exceeds screen boundaries
[0x00005b20]> e scr.pager=foo
[0x00005b20]> e scr.pager
foo
[0x00005b20]> e scr.pager=..
[0x00005b20]> e scr.pager
foo

Additional Logs, screenshots, source-code, configuration dump, ...

@ret2libc
Copy link
Contributor

ret2libc commented Jul 1, 2020

In cmd_eval.c:

	case '.': // "e "
	case ' ': // "e "
		if (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
			r_config_eval (core->config, input + 1, false);
		}

the if (r_str_endswith ('.')) is done so if you do e cfg. you would get the list of all variables under cfg.. However, in this case it causes issues because it does not call r_config_eval to set the variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants