Description
It would be neat if we could call other commands from within a command. For example, if someone calls the -handler command without an argument, it would be nice if the -help handler command was returned.
Ideas
I think we can use the Strategy Design Pattern, and make a strategy for each command. That way it get's decoupled from the command itself, making it less dependent on it, thus making it easier to call from other contexts.
Strategy Design Pattern explanation:
https://www.youtube.com/watch?v=SicL4fYCz8w
Example usage:
https://github.com/andreidimaano/Isabelle
https://github.com/andreidimaano/Isabelle/tree/master/src/strategy
Possible dependencies
- TypeScript: We may need to add TypeScript for this to work as intended.
Description
It would be neat if we could call other commands from within a command. For example, if someone calls the
-handlercommand without an argument, it would be nice if the-help handlercommand was returned.Ideas
I think we can use the Strategy Design Pattern, and make a strategy for each command. That way it get's decoupled from the command itself, making it less dependent on it, thus making it easier to call from other contexts.
Strategy Design Pattern explanation:
https://www.youtube.com/watch?v=SicL4fYCz8w
Example usage:
https://github.com/andreidimaano/Isabelle
https://github.com/andreidimaano/Isabelle/tree/master/src/strategy
Possible dependencies