{"repo":"bashup/events","free":true,"listed":false,"github":"https://github.com/bashup/events","clone":"git clone https://github.com/bashup/events.git","description":"An event/callback/promise system for bash apps that's fast (10k/s), tiny (<2.2K), and portable (bash 3.2+, builtins-only)","language":"Shell","stars":90,"topics":["bash","bash-scripting","events","event-driven","shell-scripting"],"license":"CC0-1.0","category":"cli-tools","readme_excerpt":"Practical Event Listeners for Bash bashup.events is an event listener/callback API for creating extensible bash programs. It's small ( 2k), fast ( 10k events/second), and highly portable (no bash4-isms or external programs used). Events can be one-time or repeated, listeners can be added or removed, and any string can be an event name. (You can even have \"promises\", of a sort!) Callbacks can be any command or function plus any number of arguments, and can even opt to receive additional arguments supplied by the event. Other features include: Running a callback each time something happens ( event on , event emit ) Running a callback the next time something happens, but not after that ( event once ) Alerting subscribers of an event once, making them re-subscribe for future occurrences ( event fire ) Alerting subscribers of a one-time only event or calculation... not just current subscribers, but future ones as well ( event resolve ) Allowing subscribed callbacks to veto a process (e.g. validation rules), using event all Searching for the first callback that can successfully handle something, using event any Contents - Installation, Requirements And Use - Basic Operations event on event emit event off event has event fire - Passing Arguments To Callbacks - Promise-Like Events event resolve event resolved - Conditional Operations event all event any - Other Operations event once event encode event decode event get event list event quote event error - Event Handlers and Subshells ","default_branch":null,"files":null,"tree":[],"storefront":"/r/bashup","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bashup/events/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}