github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/gen/includes/order-of-precedence.inc.md (about)

     1  There is an order of precedence for which commands are looked up:
     2  
     3  1. `runmode`: this is executed before the rest of the script. It is invoked by
     4     the pre-compiler forking process and is required to sit at the top of any
     5     scripts.
     6  
     7  1. `test` and `pipe` functions also alter the behavior of the compiler and thus
     8     are executed ahead of any scripts.
     9  
    10  4. private functions - defined via `private`. Private's cannot be global and
    11     are scoped only to the module or source that defined them. For example, You
    12     cannot call a private function directly from the interactive command line
    13     (however you can force an indirect call via `fexec`).
    14  
    15  2. Aliases - defined via `alias`. All aliases are global.
    16  
    17  3. Murex functions - defined via `function`. All functions are global.
    18  
    19  5. Variables (dollar prefixed) which are declared via `global`, `set` or `let`.
    20     Also environmental variables too, declared via `export`.
    21  
    22  6. globbing: however this only applies for commands executed in the interactive
    23     shell.
    24  
    25  7. Murex builtins.
    26  
    27  8. External executable files
    28  
    29  You can override this order of precedence via the `fexec` and `exec` builtins.