sourceImport 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 versionmurex-parser: Runs the Murex parser against a block of
codeprivate: 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 lineThis 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 Fri Oct 24 08:59:31 UTC 2025 against commit e59ab49e59ab49e1628d8546d2ad8ce5eb1150445f6a940.
Current version is 7.1.4143 (unknown) which has been verified against tests cases.