From 02161f0bb83815a693433ceb05aad05d46376fd5 Mon Sep 17 00:00:00 2001 From: pancake Date: Sun, 15 May 2016 23:19:06 +0200 Subject: [PATCH] Add r2 -qv and update manpage --- binr/radare2/radare2.c | 9 ++++++++- man/radare2.1 | 16 ++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/binr/radare2/radare2.c b/binr/radare2/radare2.c index 3a718e82a6..d50be5a5a8 100644 --- a/binr/radare2/radare2.c +++ b/binr/radare2/radare2.c @@ -430,7 +430,14 @@ int main(int argc, char **argv, char **envp) { threaded = true; break; #endif - case 'v': verify_version(0); return blob_version ("radare2"); + case 'v': + if (quiet) { + printf ("%s\n", R2_VERSION); + return 0; + } else { + verify_version (0); + return blob_version ("radare2"); + } case 'V': return verify_version (1); case 'w': perms = R_IO_READ | R_IO_WRITE; break; default: diff --git a/man/radare2.1 b/man/radare2.1 index 7209f06715..7ed09bc91a 100644 --- a/man/radare2.1 +++ b/man/radare2.1 @@ -1,4 +1,4 @@ -.Dd Jan 31, 2015 +.Dd May 15, 2016 .Dt RADARE2 1 .Sh NAME .Nm radare2 @@ -72,7 +72,7 @@ Do not load user settings/projects from ~/.radare2rc, ~/.config/radare2/radare2r .It Fl nn Only load the rbin structures (elf, mach0, ...) .It Fl N -Do not perform any analysis (r_bin). Just load the raw file. +Do not perform any analysis (r_bin). Just load the raw file .It Fl q Quiet mode (no prompt) .It Fl p Ar prj @@ -80,7 +80,7 @@ Set project file .It Fl P Ar file Apply rapatch file and quit .It Fl R Ar rarun2 -Specify dbg.profile rarun2 profile to use when spawning a program for debugging. +Specify dbg.profile rarun2 profile to use when spawning a program for debugging .It Fl s Ar addr Start seeking at this address .It Fl S @@ -88,9 +88,9 @@ Enable sandboxed mode (same as \-e cfg.sandbox=true) .It Fl t Get binary information using a thread .It Fl u -Set bin.filter=false to load rbin info without filtering names. +Set bin.filter=false to load rbin info without filtering names .It Fl v -Show version information and exit. +Show version information and exit (Use -qv to get just the version number) .It Fl V Show radare2 library versions .It Fl w @@ -101,12 +101,12 @@ Show help message Show files and environment help .El .Sh SHELL -Type '?' for help. +Type '?' for help .Pp .Sh VISUAL -To enter visual mode use the 'V' command. Then press '?' for help. +To enter visual mode use the 'V' command. Then press '?' for help .Sh DEBUGGER -In r2 the debugger commands are implemented under the 'd' command. Type 'd?' for help. +In r2 the debugger commands are implemented under the 'd' command. Type 'd?' for help .Sh ENVIRONMENT RHOMEDIR ~/.config/radare2 RCFILE ~/.radare2rc (user preferences, batch script)