which
)Locate command origin
which
locates a command’s origin. If stdout is a TTY,
then it’s output will be human readable. If stdout is a pipe then it’s
output will be a simple list.
which
can take multiple parameters, each representing a
different command you want looked up.
which command... -> <stdout>
» which cat dog jobs git dug
cat => (/bin/cat) cat - concatenate and print files
dog => unknown
jobs => (alias) fid-list --jobs => (builtin) Lists all running functions within the current Murex session
git => (/opt/homebrew/bin/git -> ../Cellar/git/2.41.0/bin/git) git - the stupid content tracker
dug => (murex function) A bit like dig but which outputs JSON
» which cat dog jobs git dug -> cat
/bin/cat
unknown
alias
/opt/homebrew/bin/git
function
There are a few different types of commands:
This will be represented in which
and type
by the term alias and, when stdout is a TTY,
which
will follow the alias to print what command the alias
points to.
This is a Murex function (defined via function
) and will
be represented in which
and type
by the term
function.
This is a private function (defined via private
) and
will be represented in which
and type
by the
term private.
This is a shell builtin, like out
and exit
.
It will be represented in which
and type
by
the term builtin.
This is any other external command, such as systemctl
and python
. This will be represented in which
by the path to the executable. When stdout is a TTY, which
will also print the destination path of any symlinks too.
In type
, it is represented by the term
executable.
alias
): Create an alias for a commandtype
): Command type (function, builtin, alias,
etc)exec
): Runs an executablefexec
): Execute a command or function, bypassing the
usual order of precedence.exit
):
Exit murexout
):
Print a string to the stdout with a trailing new line characterfunction
): Define a function blockThis document was generated from builtins/core/management/which_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 Wed Jul 2 22:12:32 UTC 2025 against commit bb72b6fbb72b6fdd502f835172d7d06207ba4ec2c70886c.
Current version is 7.0.2107 (develop) which has been verified against tests cases.