Execute Shell Function or Builtin (fexec)

Execute a command or function, bypassing the usual order of precedence.

Description

fexec allows you to execute a command or function, bypassing the usual order of precedence.

Usage

fexec flag command [ parameters... ] -> <stdout>

Examples

fexec private /source/builtin/autocomplete.alias

Flags

Detail

Order of precedence

There is an order of precedence for which commands are looked up:

  1. runmode: this is executed before the rest of the script. It is invoked by the pre-compiler forking process and is required to sit at the top of any scripts.
  2. test and pipe functions also alter the behavior of the compiler and thus are executed ahead of any scripts.
  3. 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 directly from the interactive command line (however you can force an indirect call via fexec).
  4. Aliases - defined via alias. All aliases are global.
  5. Murex functions - defined via function. All functions are global.
  6. Variables (dollar prefixed) which are declared via global, set or let. Also environmental variables too, declared via export.
  7. globbing: however this only applies for commands executed in the interactive shell.
  8. Murex builtins.
  9. External executable files

You can override this order of precedence via the fexec and exec builtins.

Compatibility with POSIX

For compatibility with traditional shells like Bash and Zsh, builtin is an alias to fexec builtin

Synonyms

See Also


This document was generated from builtins/core/management/fexec_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 Nov 23 00:50:15 UTC 2024 against commit 69c17da69c17da3bd9db98ca508f6a03a402f074ee24cec.

Current version is 6.4.0375 (develop) which has been verified against tests cases.