Aliases now use a hashtable. Aliases are now either commands or data.
Data aliases may be strings or raw bytes.
* Expand alias API
* Remove remote aliases - remote commands can still be aliased normally
* Update alias help text
* Fix an alias test and add new tests
* Add r_str_escape_raw() for null-safe escaping of unprintable characters
* Remove command to print alias without newline
* Fix dif command opening files as strings
* Convert R_CMD_DESC_TYPE_GROUP to INNER
* Avoid confusing "group_" prefixes by splitting cmddesc ##newshell
Create "group" command descriptor and give them their own help, to avoid
dupping fields such as group_summary, group_args_str, etc. By having a
separate help structure for the grouping node we make the cmd_api code
easier because it doesn't need to distinguish between
group_summary/summary, group_args_str/args_str, etc. and we avoid few
bytes for each command descriptor help structure, since most of them
did not use group_* fields.
* Other simplification in cmd_api due to split GROUP/exec cb.
* Handle R_CMD_DESC_TYPE_GROUP in r_cmd_call_parsed_args
* Add GROUP RCmdDesc type and fix where the args_str is shown
* Adjust color of `[?]`
* Differentiate between cmd<?> and cmd[?]
<?> when cmd is not valid by itself
[?] when cmd is valid but there are also other sub-commands available
* Fix usage for commands like `w` that are both commands and groups
* Do not automatically switch to detail=2 for leaf commands
* Fix test due to change in `?`/`??` behaviour
* Add RCmdDesc and use it for newshell to call command handlers
* Keep supporting existing RCorePlugin commands
* Properly free RCmdDesc tree
* Remove help from API because not used
* Check for cp->call before using it
* Set res to 0 because otherwise it could exit too early
* Remove r_cmd_call_long API because never used
* Remove r_cmd_add_long because never used
* Remove r_cmd_args and fix some spaces
* Add RCmdParsedArgs and unit tests
* Introduce r_cmd_call_parsed_args and use it in cmd.c
* Introduce RCmdParsedArgs in cmd.c
* Move radare2-shell-parser/tree-sitter into shlr
* compile new shell parser by default, available with cfg.newshell variable
* Add README for radare2-shell-parser
* Improve CI
* Add gitattributes file
* Use TSSymbol instead of comparing type strings
This patch uses ts_node_symbol instead of ts_node_type to check whether
a node is of a given type. Since TSSymbol is just an integer, the check
will be much faster. Also, it allows to store commands handler in an
hashtable, instead of having if-cascade.
* Make sure r_config_hold works even when keys do not exist or are freed
* Add support for all _tmp_commands
* Make sure to always reuse the same TSLanguage
* Update both tree-sitter and radare2-shell-parser
This way we use TSLanguage version 11, which fixes some problems with
TSSymbols.
* Compute is_last_cmd on each single command and fix logging
is_last_cmd should be set on a per-command basis, so if you analyze
things like `pd 3; .; .; .;` the `.` refers to `pd 3`.
This also fixes logging, so when an invalid command is parsed, it is
still available in the history.
* Add comment about directly using r2-shell-parser in r_core_cmd_lines
r_core_cmd_lines tries to parse the input and split it in lines, but at
least in theory, we don't need it as the new parser can already handle
full scripts.
* Allow other tasks to run between commands even in the new parser
* Update radare2-shell-parser
Lowercase i8080 disassembler (use e asm.ucase=true)
Add Alexander in AUTHORS
Extend r_cmd api to support aliases
Add new '-' command to register and call command aliases
Use RList in RCmd instead of kernel's list.h
Autocomplete aliases with <tab>
Add 'make DEBUG=1' to compile with -g
Do not strip symbols when compiling in debug mode