Run Before hooks before shell completion#2349
Conversation
dearchap
left a comment
There was a problem hiding this comment.
@ibobgunardi Excellent work. Very nicely done. I am just wondering if having Before execute for shell completion needs to be behind a flag. I dont know what users want. Having Before triggered by default or not. @urfave/cli please chime in.
|
@dearchap I need a diagram with expanded explanation of steps like |
|
Here is the split I had in mind: The practical case is shared setup that both the action and completion need: loading config, initializing command-scoped state, or preparing a client/cache that the completion callback reads from. The completion path still exits before action execution and required-flag validation; this change just gives completion the same command setup step that a normal run gets. The regression test uses a nested command where |
What type of PR is this?
What this PR does / why we need it:
Beforehooks before invoking shell completionBeforeWhich issue(s) this PR fixes:
Fixes #2348
Testing
Release Notes