store.d.elv 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #elvdoc:fn next-cmd-seq
  2. #
  3. # ```elvish
  4. # store:next-cmd-seq
  5. # ```
  6. #
  7. # Outputs the sequence number that will be used for the next entry of the
  8. # command history.
  9. #elvdoc:fn add-cmd
  10. #
  11. # ```elvish
  12. # store:add-cmd $text
  13. # ```
  14. #
  15. # Adds an entry to the command history with the given content. Outputs its
  16. # sequence number.
  17. #elvdoc:fn del-cmd
  18. #
  19. # ```elvish
  20. # store:del-cmd $seq
  21. # ```
  22. #
  23. # Deletes the command history entry with the given sequence number.
  24. #
  25. # **NOTE**: This command only deletes the entry from the persistent store. When
  26. # deleting an entry that was added in the current session, the deletion will
  27. # not take effect for the current session, since the entry still exists in the
  28. # in-memory per-session history.
  29. #elvdoc:fn cmd
  30. #
  31. # ```elvish
  32. # store:cmd $seq
  33. # ```
  34. #
  35. # Outputs the content of the command history entry with the given sequence
  36. # number.
  37. #elvdoc:fn cmds
  38. #
  39. # ```elvish
  40. # store:cmds $from $upto
  41. # ```
  42. #
  43. # Outputs all command history entries with sequence numbers between `$from`
  44. # (inclusive) and `$upto` (exclusive). Use -1 for `$upto` to not set an upper
  45. # bound.
  46. #
  47. # Each entry is represented by a pseudo-map with fields `text` and `seq`.
  48. #elvdoc:fn add-dir
  49. #
  50. # ```elvish
  51. # store:add-dir $path
  52. # ```
  53. #
  54. # Adds a path to the directory history. This will also cause the scores of all
  55. # other directories to decrease.
  56. #elvdoc:fn del-dir
  57. #
  58. # ```elvish
  59. # store:del-dir $path
  60. # ```
  61. #
  62. # Deletes a path from the directory history. This has no impact on the scores
  63. # of other directories.
  64. #elvdoc:fn dirs
  65. #
  66. # ```elvish
  67. # store:dirs
  68. # ```
  69. #
  70. # Outputs all directory history entries, in decreasing order of score.
  71. #
  72. # Each entry is represented by a pseudo-map with fields `path` and `score`.