Commit Graph
11 Commits
Author SHA1 Message Date
MsprgandClaude Fable 5 d852118de5 client: build the tab completion vocabulary at runtime from the command tree
Tab completion used a generated table (pm3line_vocabulary.h, refreshed by
hand via `make commands`) that drifted from the real command tables: new
commands were missing (e.g. `hw bwm*`), removed ones lingered, and the
"offline" flag depended on the platform of whoever regenerated it
(IfPm5() returns true offline on PM5 builds).

Build the vocabulary at startup instead:

- cmdparser: add walkCommandsRecursive(), a tree walk using a fourth
  internal sentinel (XX_internal_command_walk_XX) next to the dump ones.
  It hands each leaf to a visitor as its command_t chain (ancestors +
  leaf). A dispatch counter detects entries shown like a category but
  with their own parser (reveng) and reports them as leaves.
- pm3line_vocabulary: dynamic vocabulary holding the IsAvailable()
  predicates of every command and its ancestor categories, so completion
  applies exactly the rule CmdsHelp() uses, live, for both offline and
  connected devices. Script entries ("script run <relpath>") come from
  the same directories `script list` scans, sorted, including
  subdirectories with the path `script run` needs.
- pm3line: readline and linenoise completers consume the live vocabulary.
  The walk runs with output disabled so category handlers stay silent.
- Drop pm3_help2list.py and the header regeneration from `make commands`.

Behaviour change: entries whose category is hidden by `help` (e.g. `mem`,
`usart` offline) are no longer offered, matching `help`; when connected,
commands the device does not support are no longer offered either.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 14:29:04 +02:00
Philippe Teuwen d2a8cca233 Add pm5 capabilities 2026-08-19 12:04:33 +02:00
Aaron Tulino (Aaronjamt) 722a8aac8c [hf seos] Simulate client support 2025-12-22 15:10:51 -07:00
jlitewski 791f02209d Implemented Buffer SaveStates 2024-04-20 14:14:15 -04:00
Philippe Teuwen 30aa7aa7d1 Adapting license headers, WIP 2022-01-08 00:40:52 +01:00
iceman1001 d7291aac29 add some capabilities 2021-12-24 15:09:19 +01:00
Philippe Teuwen 008a0b5ab4 First attempt at dumping all help: proxmark3 --fulltext 2021-04-19 02:54:16 +02:00
Christian Molson 614ab55809 Initial commit for em4x70 support.
Initially I only have an em4x70 variant used for car transponders.
Also known as the ID48.
2020-12-05 17:47:03 -05:00
Philippe Teuwen 5e26c096bb hw version: display firmware platform info 2020-09-25 16:42:54 +02:00
tharexde 91ff0350df introduced 'IfPm3EM4x50' function 2020-06-28 21:39:59 +02:00
Bjoern Kerler 81bc0bc2b9 Reorder client src directories 2020-04-16 10:53:24 +02:00