builtin_fn_fs.d.elv 679 B

1234567891011121314151617181920212223242526272829303132333435
  1. #elvdoc:fn cd
  2. #
  3. # ```elvish
  4. # cd $dirname
  5. # ```
  6. #
  7. # Changes directory.
  8. #
  9. # This affects the entire process, including parallel tasks that are started
  10. # implicitly (such as prompt functions) or explicitly (such as one started by
  11. # [`peach`](#peach)).
  12. #
  13. # Note that Elvish's `cd` does not support `cd -`.
  14. #
  15. # @cf pwd
  16. #elvdoc:fn tilde-abbr
  17. #
  18. # ```elvish
  19. # tilde-abbr $path
  20. # ```
  21. #
  22. # If `$path` represents a path under the home directory, replace the home
  23. # directory with `~`. Examples:
  24. #
  25. # ```elvish-transcript
  26. # ~> echo $E:HOME
  27. # /Users/foo
  28. # ~> tilde-abbr /Users/foo
  29. # ▶ '~'
  30. # ~> tilde-abbr /Users/foobar
  31. # ▶ /Users/foobar
  32. # ~> tilde-abbr /Users/foo/a/b
  33. # ▶ '~/a/b'
  34. # ```