eval.d.elv 1.7 KB

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