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 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 Sat Aug 23 22:28:13 UTC 2025 against commit ad23f13ad23f131bfecd82ea8a12d9b3e92aab5d8398ae9.
Current version is 7.0.2129 (website) which has been verified against tests cases.