Commit Graph

17 Commits

Author SHA1 Message Date
Lephenixnoir 0f23fec85d
shell: fix double syntax errors aborting program
Type e.g. "e 1 + 2 * 3". The first "+" throws a syntax error
(parentheses are needed around expressions) and the "*" another one
during the final exhaust_until_separator phase, which wasn't protected
by a try/catch.
2023-08-20 18:31:30 +02:00
Lephenixnoir 0f5c1c2eba
shell: improve error behavior of parser and autocompletion
* Example on _e, but other commands are probably affected
* When completing, throw CompletionRequest("_error", <message>) to have
  a reasonable output and not mess up readline
* Avoid early returns (or if a command really cannot be completed,
  adjust the ShellCommand declaration to not run the command)
* Less CommandError in the parser, these would throw during
  autocompletion and annoy everyone
* Allow options with empty value so that we don't throw when
  autocompleting after typing eg. 'vspace='
2022-04-18 11:55:25 +01:00
Dr-Carlos 12845a1675 Improve command classification 2022-04-15 06:09:18 +09:30
Dr-Carlos 5f82ad29e7 Enable -l for log option 2022-04-06 07:28:28 +09:30
Lephenixnoir 8b1105fb03
shell: add --log CLI parameter 2022-04-05 15:36:24 +01:00
Lephenixnoir 613e5b07f4
remove explicit \e coloring 2022-04-05 12:23:39 +01:00
Lephenixnoir d61f4e0a2f
meta: fix uninitialized command-line argument logic 2022-04-05 11:11:19 +01:00
Lephenixnoir f7f5fbf884
shell: fix uninitialized CLI parameters
Could start with show_help = true at higher optimization levels.
2022-04-04 10:51:31 +01:00
Dr-Carlos ef40cb3469 Add comments and allow multiple -e options 2022-04-01 06:24:48 +10:30
Dr-Carlos 446590448b Change debugger to disassembler in --help 2022-03-31 20:04:04 +10:30
Dr-Carlos b6fbc352e0 Add --norc, --help, -e, and FILE options 2022-03-31 19:54:44 +10:30
Lephenixnoir 59ed0c8621
add main disassembly, ad and ads commands 2022-03-28 22:42:53 +01:00
Lephenixnoir 29cd2815ec
refactor disassembly infrastructure and passes 2022-03-28 20:59:30 +01:00
Lephenixnoir 54721cac93
README for the shell interface 2022-03-06 23:39:44 +00:00
Lephenixnoir 4e76ff3a24
add command help messages 2022-03-06 16:15:19 +00:00
Lephenixnoir bd5e1f918c
change option syntax; less exceptions; better autocompletion
* Change option syntax to <name>=<value>, with mandatory "=". This is
  still not great, but manageable.
* Remove the Session::require_vspace() function, whose named overload
  was misused (to check for the existence of a named space), and the
  associated exceptions. Explicit error flow is better error flow.
* Change the autocompletion system to generate all options in a vector
  of strings and then iterate, rather than using generators.
* Add completion for symbols.
2022-03-04 22:54:45 +00:00
Lephenixnoir 3b684389e9
replace CLI with WIP shell (huge commit) 2022-03-04 11:29:33 +00:00