elvish/pkg/eval/builtin_fn_cmd.d.elv
Qi Xiao 08007a52ce website/cmd/md2html: Support implicit link targets to elvdoc sections.
For example, [`put`]() links to the elvdoc for "put".

Also remove the @cf macro now that implicit targets make it easier to link to
other elvdoc sections.
2023-01-02 02:36:58 +00:00

45 lines
1.2 KiB
Plaintext

# Construct a callable value for the external program `$program`. Example:
#
# ```elvish-transcript
# ~> var x = (external man)
# ~> $x ls # opens the manpage for ls
# ```
#
# See also [`has-external`]() and [`search-external`]().
fn external {|program| }
# Test whether `$command` names a valid external command. Examples (your output
# might differ):
#
# ```elvish-transcript
# ~> has-external cat
# ▶ $true
# ~> has-external lalala
# ▶ $false
# ```
#
# See also [`external`]() and [`search-external`]().
fn has-external {|command| }
# Output the full path of the external `$command`. Throws an exception when not
# found. Example (your output might vary):
#
# ```elvish-transcript
# ~> search-external cat
# ▶ /bin/cat
# ```
#
# See also [`external`]() and [`has-external`]().
fn search-external {|command| }
# Replace the Elvish process with an external `$command`, defaulting to
# `elvish`, passing the given arguments. This decrements `$E:SHLVL` before
# starting the new process.
#
# This command always raises an exception on Windows with the message "not
# supported on Windows".
fn exec {|command? @args| }
# Exit the Elvish process with `$status` (defaulting to 0).
fn exit {|status?| }