src.elv.sh@v0.21.0-dev.0.20240515223629-06979efb9a2a/pkg/eval/eval.d.elv (about)

     1  #//skip-test
     2  # A list of functions to run after changing directory. These functions are always
     3  # called with directory to change it, which might be a relative path. The
     4  # following example also shows `$before-chdir`:
     5  #
     6  # ```elvish-transcript
     7  # ~> set before-chdir = [{|dir| echo "Going to change to "$dir", pwd is "$pwd }]
     8  # ~> set after-chdir = [{|dir| echo "Changed to "$dir", pwd is "$pwd }]
     9  # ~> cd /usr
    10  # Going to change to /usr, pwd is /Users/xiaq
    11  # Changed to /usr, pwd is /usr
    12  # /usr> cd local
    13  # Going to change to local, pwd is /usr
    14  # Changed to local, pwd is /usr/local
    15  # /usr/local>
    16  # ```
    17  #
    18  # **Note**: The use of `echo` above is for illustrative purposes. When Elvish
    19  # is used interactively, the working directory may be changed in location mode
    20  # or navigation mode, and outputs from `echo` can garble the terminal. If you
    21  # are writing a plugin that works with the interactive mode, it's better to use
    22  # [`edit:notify`](edit.html#edit:notify).
    23  #
    24  # See also [`$before-chdir`]().
    25  var after-chdir
    26  
    27  # A list of functions to run before changing directory. These functions are always
    28  # called with the new working directory.
    29  #
    30  # See also [`$after-chdir`]().
    31  var before-chdir
    32  
    33  # A list of functions to run before Elvish exits.
    34  var before-exit
    35  
    36  # Number of background jobs.
    37  var num-bg-jobs
    38  
    39  # Whether to notify success of background jobs, defaulting to `$true`.
    40  #
    41  # Failures of background jobs are always notified.
    42  var notify-bg-job-success
    43  
    44  #//skip-test
    45  #// The test framework hardcodes value out indicators.
    46  # A string put before value outputs (such as those of `put`). Defaults to
    47  # `'▶ '`. Example:
    48  #
    49  # ```elvish-transcript
    50  # ~> put lorem ipsum
    51  # ▶ lorem
    52  # ▶ ipsum
    53  # ~> set value-out-indicator = 'val> '
    54  # ~> put lorem ipsum
    55  # val> lorem
    56  # val> ipsum
    57  # ```
    58  #
    59  # Note that you almost always want some trailing whitespace for readability.
    60  var value-out-indicator