Create an alias for a command
alias defines an alias for global usage
alias: alias=command parameter parameter !alias: command
Because aliases are parsed into an array of parameters, you cannot put the entire alias within quotes. For example:
# bad :( » alias hw="out Hello, World!" » hw exec: "out\\ Hello,\\ World!": executable file not found in $PATH # good :) » alias hw=out "Hello, World!" » hw Hello, World!
Notice how only the command
out "Hello, World!" is quoted in
alias the same way you would have done if you'd run that command "naked" in the command line? This is how
alias expects it's parameters and where
alias on murex differs from
alias in POSIX shells.
In some ways this makes
alias a little less flexible than it might otherwise be. However the design of this is to keep
alias focused on it's core objective. For any more advanced requirements you can use a
Alias names can only include alpha-numeric characters, hyphen and underscore. The following regex is used to validate the
Like all other definable states in murex, you can delete an alias with the bang prefix:
» alias hw=out "Hello, World!" » hw Hello, World! » !alias hw » hw exec: "hw": executable file not found in $PATH
There is an order of precedence for which commands are looked up: 1.
pipe functions because they alter the behavior of the compiler 2. Aliases - defined via
alias. All aliases are global 3. murex functions - defined via
function. All functions are global 4. private functions - defined via
private. Private's cannot be global and are scoped only to the module or source that defined them. For example, You cannot call a private function from the interactive command line 5. variables (dollar prefixed) - declared via
let 6. auto-globbing prefix:
@g 7. murex builtins 8. external executable files
exec: Runs an executable
export: Define an environmental variable and set it's value
fexec: Execute a command or function, bypassing the usual order of precedence.
function: Define a function block
g: Glob pattern matching for file system objects (eg *.txt)
global: Define a global variable and set it's value
let: Evaluate a mathematical function and assign to variable
private: Define a private function block
set: Define a local variable and set it's value
source: Import murex code from another file of code block
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 Tue Jun 22 08:18:17 UTC 2021 against commit 2235c7b2235c7b18f86f1cf214e246b88b0ea193d87fe80.
Current version is 2.2.1100 BETA which has been verified against tests.