event
Event driven programming for shell scripts
Create or destroy an event interrupt
event: event-type name=interrupt { code block }
!event: event-type name
Create an event:
event: onSecondsElapsed autoquit=60 {
out "You're 60 second timeout has elapsed. Quitting murex"
exit 1
}
Destroy an event:
!event onSecondsElapsed autoquit
The interrupt
field in the CLI supports ANSI constants. eg
event: onKeyPress f1={F1-VT100} {
tout: qs HintText="Key F1 Pressed"
}
To list compiled event types:
» runtime: --events -> formap k v { out $k }
onFileSystemChange
onKeyPress
onSecondsElapsed
event
!event
formap
: Iterate through a map or other collection of datafunction
: Define a function blockopen
: Open a file with a preferred handlerprivate
: Define a private function blockruntime
: Returns runtime information on the internal state of murexThis site's content is rebuilt automatically from murex's source code after each merge to the master
branch. Downloadable murex binaries are also built with the website.
Last built on Thu May 26 22:49:43 UTC 2022 against commit 59e27bb59e27bb1013043fc4a940cf9a2767c63f31dad2c.
Current version is 2.8.2100 which has been verified against 15889 tests cases.