Feature request: global/universal actions
See original GitHub issueThese might better be defined as ‘hooks’.
I spent a while trying to create my own prehook on actions, something that would get run against every action. Something like the following:
old_action = prog.action.bind(prog);
prog.action = function () {
always_gets_called_on_every_action();
return old_action.apply(prog, arguments)
}
The problem is there’s still no way to get at the opts
argument in this prog.action
overwrite, which is what I need.
Use case: change the config file for every action (-c, --config
) without manually baking it into every action.
I decided to stop wasting time on this and make hooks or something like that an actual feature request, or at least a point of conversation.
Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
[Feature Request] Global Pokedex · Issue #68 - GitHub
Is your feature request related to a problem? Please describe. Nope. Describe the solution you'd like A Pokedex that is automatically updated with...
Read more >Universal Actions for Adaptive Cards - Teams - Microsoft Learn
Universal Actions for Adaptive Cards bring the bot as the common backend for handling actions and introduces a new action type, Action.Execute , ......
Read more >Universal Actions - Alfred
Take any text, URLs or files and perform actions on them from anywhere within Alfred or on your Mac using your Universal Action...
Read more >Universal Profile - Actions Overview
Grants ability to view and take action upon Performance (EPM) items on the Action Items page and in the Your Action Items widget....
Read more >10 Tips to Improve Your Feature Request Responses - Nicereply
Feature requests are the best way to improve your product. Here are ten tips to make the most out of them.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tunnckoCore
I couldn’t get
Object.assign
to work, no, but I don’t have that code anymore to really compare notes…Regardless…
@lukeed your
wrapper
suggestion worked great. Still trying to wrap my mind around it (no pun intended), but it’s a working solution, so closing.If you wanted to do the
prog.action
route, it’d have to look like this:What you had modified
sade
’s construct. All that method does is build the tree, but what you (originally) showed was trying to execute/wrap the handler on initialization