elvish-store(7)
โจ elvish-store โจ
okay bestie, welcome to elvish-store โ the Miscellaneous Information Manual page that's literally all about the store: module ๐
๐ธ Introduction ๐ธ
So, the store: module gives you access to Elvish's persistent data store. Like, the stuff that survives after you close the terminal. Iconic behavior fr fr.
โ ๏ธ Heads up bestie: it's only available in interactive mode now. So no scripting shenanigans with this one, okay? ๐
๐ Functions ๐
๐ฆ store:add-cmd {#store:add-cmd}
store:add-cmd $text
Drops an entry into the command history with whatever content you hand it. Then it outputs its sequence number, so you know exactly where it landed. Slay. โจ
๐ฆ store:add-dir {#store:add-dir}
store:add-dir $path
Adds a path to the directory history. And heads up โ this also makes the scores of all the other directories go down. It's giving main character energy, and every other dir is the supporting cast. ๐
๐ฆ store:cmd {#store:cmd}
store:cmd $seq
Give it a sequence number, and it outputs the content of that command history entry. That's it, that's the whole vibe. ๐
๐ฆ store:cmds {#store:cmds}
store:cmds $from $upto
Outputs all the command history entries with sequence numbers between $from (inclusive, bestie) and $upto (exclusive, so don't be surprised). Wanna skip the upper bound entirely? Pass -1 for $upto and it just won't set one. Periodt.
Each entry comes as a pseudo-map with fields text and seq.
๐ฆ store:del-cmd {#store:del-cmd}
store:del-cmd $seq
Deletes the command history entry with the given sequence number. Bye bye ๐
๐ญ NOTE: This command only deletes the entry from the persistent store. So if you're deleting an entry that got added in the current session, the deletion won't take effect for the current session, because that entry is still chilling in the in-memory per-session history. Sorry bestie, that's just how it is.
๐ฆ store:del-dir {#store:del-dir}
store:del-dir $path
Deletes a path from the directory history. And nope, this one has no impact on the scores of other directories โ unlike store:add-dir. No drama here. ๐ง
๐ฆ store:del-shared-var {#store:del-shared-var}
store:del-shared-var $name
Deletes the shared variable with the given name. Gone. Poof. โจ
๐ฆ store:dirs {#store:dirs}
store:dirs
Outputs all the directory history entries, sorted in decreasing order of score โ so the favorites show up first, naturally. ๐
Each entry is a pseudo-map with fields path and score.
๐ฆ store:next-cmd-seq {#store:next-cmd-seq}
store:next-cmd-seq
Outputs the sequence number that the next entry of the command history is gonna get. Peek into the future, lowkey. ๐ฎ
๐ฆ store:set-shared-var {#store:set-shared-var}
store:set-shared-var $name $value
Sets the value of the shared variable with the given name, and creates it if it doesn't exist yet. Super chill about it.
๐ซถ Little rule tho: the value must be a string. No exceptions, bestie.
๐ฆ store:shared-var {#store:shared-var}
store:shared-var $name
Outputs the value of the shared variable with the given name. And if that shared variable doesn't exist? It throws an error. ๐ So maybe check first, iykyk.
That's the whole page, bestie โ every single function, every argument, every field, all of it. Nothing skipped, no cap. ๐
This lil love letter to store: comes to you from Elvish 0.17.0, dated Nov 18, 2024. Thanks for reading, mwah ๐โจ๐
๐ฆ where this page comes from
- ubuntu jammy: elvish 0.17.0-1ubuntu0.1 ยท BSD-2-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms