Commit graph

26 commits

Author SHA1 Message Date
Giovanni
c89b12a046
Removed plenty of eprintfs in rz_core (#2950) 2022-08-29 00:32:17 +08:00
Giovanni
ea02b0d25f
Remove zignatures and move aaF[l] -> F[al] , zf[sdc] -> F[sdc] (#2682) 2022-06-29 07:49:43 +08:00
Riccardo Schirone
9df2994127
RzCmd: add support for dynamically generated details sections (#2361)
So far all the help sections were statically generated from the YAML
files, however sometimes you may want to list things in the help
messages that depend on what is loaded in Rizin (e.g. plugins, etc.).
This patch adds support for a details_cb that provides a dynamically
created RzCmdDescDetail array.
2022-02-25 09:25:15 +00:00
Khairul Azhar Kasmiran
f6ea17e1e0
?P: Ignore io.va (#2305) 2022-02-12 22:02:50 +08:00
Khairul Azhar Kasmiran
dbbd4da41a
Fix #2299: ?p ignores io.va (#2302) 2022-02-11 17:36:22 +01:00
chinggg
95be95e89a
Add floating point support to math operations (#2287) 2022-02-07 11:18:22 +01:00
Anton Kochkov
2f638cad1e Convert f commands to rzshell
* Changed behavior of `f` to only add flag if there is none
* Changed behavior of `f+` to add flag in any case
* Moved listing subcommands from `f` to `fl`
* Moved listing subcommands from `f.` to `f.l`
* Added subcommand `f.l*` to list all local flags in all functions
* Listing flags at the current offset became `fl.`
* Moved `f=` to `fl=`
* Old `fl` (flag length) now became `fL`
* Removed original `fe` commands
* Old `f?` (check if flag exists) now became `fe`
* Removed `fV` commands
* Removed `fn` commands in favor of `fl` and `asm.flags.real=true`
* Removed `fS` commands (`fSo` and `fSn`)
* `fo` became `fortune` and moved from "flags" to "shell" category
* Removed oldshell handlers of the `z` commands
2022-02-03 21:46:42 +08:00
Dhruva Gole
64740dd2d3
Add power/exponent to math operations (#2220) 2022-01-27 14:49:19 +01:00
Khairul Azhar Kasmiran
4a9d3f2438
Fix #2135: Add ..( command (#2184)
* Fix #2135 - Add `..(` command
* Use `RZ_LOG_ERROR` instead of `eprintf` inside `macro_call()`
* Improve `(?`
2022-01-13 18:10:23 +08:00
Khairul Azhar Kasmiran
b1c3595c6b
newshell help: Remove brackets from list tail (#2114) 2021-12-18 09:54:10 +01:00
Khairul Azhar Kasmiran
298f92cf56
newshell help: Start arg numbering from 1 (#2107) 2021-12-15 23:53:04 +08:00
Khairul Azhar Kasmiran
5b6aaed68d
Fix optional brackets termination of newshell help (#2077) 2021-12-09 10:58:54 +01:00
pancake
cef781411a Use RNum.math in "?b" to make '?b 1<<1' work ##shell 2021-08-17 12:03:29 +02:00
pancake
c7d530cb07 Honor < and > comparison operators in RNumMath ##shell (#18979) 2021-08-17 12:03:29 +02:00
pancake
e4906bc452 Remove colons in "?" number conversion output ##shell 2021-08-17 12:03:29 +02:00
seanachao
a2f8631b6c
Change -, --, = argument and = command meaning (#930)
* Swap = & - R (#615)&(#616)
* Fix R replace =
2021-04-21 16:20:24 +08:00
Riccardo Schirone
7088e33aee
commands: remove "comment" argument from zi* and f* (#891)
* core/cmd_zign: remove comment argument, unused and feels strange
* flag: remove pfx while printing flags in rizin commands
2021-03-24 21:40:38 +08:00
Riccardo Schirone
2e5eccdc05 core: automatically set LAST flag on last argument if of right type
Instead of relying on the developer to remember to use the
RZ_CMD_ARG_FLAG_LAST flag on the last argument when it is of the right
type, we can just set it automatically. We do it only for RZNUM, STRING
and CMD types and this can be bypassed if the devs really want. We do
not add this flag on all types because otherwise all commands handlers
would accept any number of argument. It is good instead to have the
parser immediately detect when too many arguments are passed to some
commands.
2021-02-23 10:25:16 +01:00
wargio
8cfa9e31e3 Support in newshell for <cmd>?*[j] and j*[j] <command> 2021-02-08 01:53:32 +01:00
Riccardo Schirone
28a59224b9
Consider parentheses args as $.args (#450)
In this way things such as:

(10 + 3)

Are interpreted as regular $.args, composed of:
- `(` as (arg_identifier)
- `10` as (arg (arg_identifier))
- `+` as (arg (arg_identifier))
- `3` as (arg (arg_identifier))
- `)` as (arg_identifier)
2021-01-25 18:35:37 +00:00
Riccardo Schirone
8a37385bbf
Fix ??? command, which should show the help of ? (#365)
* Fix `???` command, which should show the help of `?`

Due to recent changes it was not working anymore, because it was
interpreteing `???` as the help with detail=3 of the root node. This
patch limits the number of detail to 2 (which is what is already assumed
in another parts of the code anyway), so that `???` can be interpreted
as the help with detail=2 of `?`. For now this makes it work, however
there needs to be some review of the whole `?` subtree.

* Add test for ???

* Fix ??? test spaces

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
Co-authored-by: Florian Märkl <info@florianmaerkl.de>
2021-01-16 23:54:40 +08:00
Giovanni
35a9ef94c9
Code and comments cleanup (#108) 2020-12-04 18:11:51 +08:00
Riccardo Schirone
9ce5003ca6
Create RzCmdDesc generator from YAML file ##newshell
* Create RzCmdDesc generator from YAML file

The commands tree can be entirely described in a YAML file, that is
parsed at build-time and generates cmd_descs.c/cmd_descs.h files. The
developer then just needs to provide the handler with the proper name to
make sure things work.

* Add PyYAML to CI jobs
2020-11-16 09:36:51 +01:00
Riccardo Schirone
75a80741ee
Make root a argv RCmdDesc ##newshell (#17326) 2020-09-15 15:27:10 +02:00
Riccardo Schirone
cfd23f5e3c
Fix root help in newshell (#17104) 2020-06-19 20:16:16 +08:00
pancake
346eb5bd38
Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
Renamed from test/new/db/cmd/cmd_help (Browse further)