feat(parser): implement on-complete callback functionality

Add on_complete event handler to trigger actions after argument parsing completes
Move grep logic to separate function and register it as a completion callback
Update argument getters and help text generation to be const methods
This commit is contained in:
2025-10-06 11:17:14 +04:00
parent 5f65eca713
commit cad569de25
3 changed files with 45 additions and 27 deletions

View File

@@ -24,6 +24,8 @@ After handle_parse(...) ends, we can call the on_parse_done callbacks. But this
### Update: 6 Oct. 2025
We now have storable arguments. Now we need to implement the on_parse_done callbacks, to achieve this feature.
Also the run after complete events are implemented.
# TODO 2: Positional arguments
Positional arguments are arguments that are not prefixed with a dash. They are usually the arguments that are passed to the program.
For example, in the command `grep "pattern" file.txt`, "pattern" and "file.txt" are positional arguments.