mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-04 02:37:50 +08:00
08007a52ce
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.
45 lines
1.2 KiB
Plaintext
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?| }
|