From 1edfc2f7c108fd7c6d99a2f879cc3011d7dfc267 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 6 Oct 2025 21:17:27 +0800 Subject: [PATCH] Remove brackets from args in `rz-find -h` (#5439) --- binrz/man/rz-find.1 | 4 ++-- librz/main/rz-find.c | 26 ++++++++++++------------ test/db/tools/rz | 48 ++++++++++++++++++++++---------------------- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/binrz/man/rz-find.1 b/binrz/man/rz-find.1 index d6dbe0cdda..de4146ac4b 100644 --- a/binrz/man/rz-find.1 +++ b/binrz/man/rz-find.1 @@ -26,6 +26,8 @@ Only accept aligned hits Set block size .It Fl e Ar regex Search for regex matches (can be used multiple times) +.It Fl E Ar cmd +Execute command for each file found .It Fl f Ar from Start searching from address 'from' .It Fl F Ar file @@ -66,8 +68,6 @@ Show hexdump of search results Search for zero-terminated strings .It Fl Z Show string found on each search hit -.It Fl E Ar command -Execute for each file found. .Pp .Sh SEE ALSO .Pp diff --git a/librz/main/rz-find.c b/librz/main/rz-find.c index 84b81f84e1..a16ee15bef 100644 --- a/librz/main/rz-find.c +++ b/librz/main/rz-find.c @@ -197,27 +197,27 @@ static int show_help(const char *argv0, int line) { } const char *options[] = { // clang-format off - "-a", "[align]", "Only accept aligned hits", - "-b", "[size]", "Set block size", - "-e", "[regex]", "Search for regex matches (can be used multiple times)", - "-E", "[cmd]", "Execute command for each file found", - "-f", "[from]", "Start searching from address 'from'", - "-F", "[file]", "Read the contents of the file and use it as keyword", + "-a", "align", "Only accept aligned hits", + "-b", "size", "Set block size", + "-e", "regex", "Search for regex matches (can be used multiple times)", + "-E", "cmd", "Execute command for each file found", + "-f", "from", "Start searching from address 'from'", + "-F", "file", "Read the contents of the file and use it as keyword", "-h", "", "Show this help", "-i", "", "Identify filetype (rizin -nqcpm file)", "-j", "", "Output in JSON", "-m", "", "Magic search, file-type carver", - "-M", "[str]", "Set a binary mask to be applied on keywords", + "-M", "str", "Set a binary mask to be applied on keywords", "-n", "", "Do not stop on read errors", "-r", "", "Print using rizin commands", - "-s", "[str]", "Search for a specific string (can be used multiple times)", - "-w", "[str]", "Search for a specific wide string (can be used multiple times). Assumes str is UTF-8.", - "-I", "[str]", "Search for an entry in import table.", - "-S", "[str]", "Search for a symbol in symbol table.", - "-t", "[to]", "Stop search at address 'to'", + "-s", "str", "Search for a specific string (can be used multiple times)", + "-w", "str", "Search for a specific wide string (can be used multiple times). Assumes str is UTF-8.", + "-I", "str", "Search for an entry in import table.", + "-S", "str", "Search for a symbol in symbol table.", + "-t", "to", "Stop search at address 'to'", "-q", "", "Quiet - do not show headings (filenames) above matching contents (default for searching a single file)", "-v", "", "Show version information", - "-x", "[hex]", "Search for hexpair string (909090) (can be used multiple times)", + "-x", "hex", "Search for hexpair string (909090) (can be used multiple times)", "-X", "", "Show hexdump of search results", "-z", "", "Search for zero-terminated strings", "-Z", "", "Show string found on each search hit", diff --git a/test/db/tools/rz b/test/db/tools/rz index 687aed79fe..c107af71b1 100644 --- a/test/db/tools/rz +++ b/test/db/tools/rz @@ -499,30 +499,30 @@ ec diff.match green | match color ec diff.unmatch red | mismatch color Usage: rz-find [-mXnzZhqv] [-a align] [-b sz] [-f/t from/to] [-[e|s|w|S|I] str] [-x hex] -|file|dir .. - -a [align] Only accept aligned hits - -b [size]  Set block size - -e [regex] Search for regex matches (can be used multiple times) - -E [cmd]  Execute command for each file found - -f [from]  Start searching from address 'from' - -F [file]  Read the contents of the file and use it as keyword - -h Show this help - -i Identify filetype (rizin -nqcpm file) - -j Output in JSON - -m Magic search, file-type carver - -M [str]  Set a binary mask to be applied on keywords - -n Do not stop on read errors - -r Print using rizin commands - -s [str]  Search for a specific string (can be used multiple times) - -w [str]  Search for a specific wide string (can be used multiple times). Assumes str is UTF-8. - -I [str]  Search for an entry in import table. - -S [str]  Search for a symbol in symbol table. - -t [to]  Stop search at address 'to' - -q Quiet - do not show headings (filenames) above matching contents (default for searching a single file) - -v Show version information - -x [hex]  Search for hexpair string (909090) (can be used multiple times) - -X Show hexdump of search results - -z Search for zero-terminated strings - -Z Show string found on each search hit + -a align Only accept aligned hits + -b size  Set block size + -e regex Search for regex matches (can be used multiple times) + -E cmd  Execute command for each file found + -f from  Start searching from address 'from' + -F file  Read the contents of the file and use it as keyword + -h Show this help + -i Identify filetype (rizin -nqcpm file) + -j Output in JSON + -m Magic search, file-type carver + -M str  Set a binary mask to be applied on keywords + -n Do not stop on read errors + -r Print using rizin commands + -s str  Search for a specific string (can be used multiple times) + -w str  Search for a specific wide string (can be used multiple times). Assumes str is UTF-8. + -I str  Search for an entry in import table. + -S str  Search for a symbol in symbol table. + -t to  Stop search at address 'to' + -q Quiet - do not show headings (filenames) above matching contents (default for searching a single file) + -v Show version information + -x hex  Search for hexpair string (909090) (can be used multiple times) + -X Show hexdump of search results + -z Search for zero-terminated strings + -Z Show string found on each search hit Usage: rz-gg [-FOLsrxhvz] [-a arch] [-b bits] [-k os] [-o file] [-I path] [-i sc] [-e enc] [-B hex] [-c k=v] [-C file] [-p pad] [-q off]