mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-03 02:41:08 +00:00
Colorize 'o' and 'q' help messages
This commit is contained in:
parent
f25e1b0dfa
commit
b72e61fda1
@ -255,20 +255,26 @@ static int cmd_open(void *data, const char *input) {
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
r_cons_printf ("|Usage: o[com- ] [file] ([offset])\n"
|
||||
"| o list opened files\n"
|
||||
"| oc [file] open core file, like relaunching r2\n"
|
||||
"| oo reopen current file (kill+fork in debugger)\n"
|
||||
"| oo+ reopen current file in read-write\n"
|
||||
"| o 4 priorize io on fd 4 (bring to front)\n"
|
||||
"| o-1 close file index 1\n"
|
||||
"| o /bin/ls open /bin/ls file in read-only\n"
|
||||
"| o+/bin/ls open /bin/ls file in read-write mode\n"
|
||||
"| o /bin/ls 0x4000 map file at 0x4000\n"
|
||||
"| on /bin/ls 0x4000 map raw file at 0x4000 (no r_bin involved)\n"
|
||||
"| ob list open binary files bascked by fd\n"
|
||||
"| ob 4 priorize io and fd on 4 (bring to binfile to front)\n"
|
||||
"| om[?] create, list, remove IO maps\n");
|
||||
{
|
||||
const char *help_msg[] = {
|
||||
"Usage: o","[com- ] [file] ([offset])","",
|
||||
"o","","list opened files",
|
||||
"oc"," [file]","open core file, like relaunching r2",
|
||||
"oo","","reopen current file (kill+fork in debugger)",
|
||||
"oo","+","reopen current file in read-write",
|
||||
"o"," 4","priorize io on fd 4 (bring to front)",
|
||||
"o","-1","close file descriptor 1",
|
||||
"o"," /bin/ls","open /bin/ls file in read-only",
|
||||
"o","+/bin/ls","open /bin/ls file in read-write mode",
|
||||
"o"," /bin/ls 0x4000","map file at 0x4000",
|
||||
"on"," /bin/ls 0x4000","map raw file at 0x4000 (no r_bin involved)",
|
||||
"ob","","list open binary files bascked by fd",
|
||||
"ob"," 4","priorize io and fd on 4 (bring to binfile to front)",
|
||||
"om","[?]","create, list, remove IO maps",
|
||||
NULL
|
||||
};
|
||||
r_core_cmd_help (core, help_msg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
@ -2,15 +2,17 @@
|
||||
|
||||
static int cmd_quit(void *data, const char *input) {
|
||||
RCore *core = (RCore *)data;
|
||||
const char* help_msg[] = {
|
||||
"Usage:", "q[!] [retval]", "",
|
||||
"q","","quit program",
|
||||
"q!","","force quit (no questions)",
|
||||
"q"," 1","quit with return value 1",
|
||||
"q"," a-b","quit with return value a-b",
|
||||
NULL};
|
||||
if (input)
|
||||
switch (*input) {
|
||||
case '?':
|
||||
r_cons_printf (
|
||||
"|Usage: q[!] [retvalue]\n"
|
||||
"| q quit program\n"
|
||||
"| q! force quit (no questions)\n"
|
||||
"| q 1 quit with return value 1\n"
|
||||
"| q a-b quit with return value a-b\n");
|
||||
r_core_cmd_help (core, help_msg);
|
||||
break;
|
||||
case ' ':
|
||||
case '!':
|
||||
|
Loading…
Reference in New Issue
Block a user