source
)Import Murex code from another file or code block
source
imports code from another file or code block. It
can be used as either an “import” / “include” directive (eg Python, Go,
C, etc) or an “eval” (eg Python, Perl, etc).
<stdin> -> source
source filename.mx
source { code-block }
source module:package/module
» tout block { out "Hello, world!" } -> source
Hello, world!
» tout block { out "Hello, world!" } |> example.mx
» source example.mx
Hello, world!
» source { out "Hello, world!" }
Hello, world!
Lets say we want to use the secrets
function from the
devops
package. This secrets
function allows
us to store and recall GPG encrypted API keys, so pretty useful
functionality for a script. But since this is a script, it wouldn’t
automatically load all of the profiles and nor would we want it to.
So we could prepend the following to our script:
source module:devops/secret
source
.
args
): Command line flag parser for Murex shell
scriptingexec
): Runs an executablefexec
): Execute a command or function, bypassing the
usual order of precedence.version
): Get Murex versionprivate
): Define a private function blockfunction
): Define a function blockconfig
): Query or define Murex runtime settingsruntime
): Returns runtime information on the internal
state of Murexautocomplete
): Set definitions for tab-completion in
the command linemurex-parser
:
Runs the Murex parser against a block of codeThis document was generated from builtins/core/management/source_doc.yaml.
This 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 Wed Jul 2 22:12:32 UTC 2025 against commit bb72b6fbb72b6fdd502f835172d7d06207ba4ec2c70886c.
Current version is 7.0.2107 (develop) which has been verified against tests cases.