ENVSTORE(1)

πŸ’– ENVSTORE(1) πŸ’–

okay bestie, gather round, because this one is actually iconic. it's envstore from the General Commands Manual, and it's giving "your environment variables, but make it portable." ✨


🌸 NAME 🌸

envstore β€” save and restore environment variables 🫢


✨ SYNOPSIS ✨

envstore command [args ...]

πŸ’… DESCRIPTION πŸ’…

so basically, envstore can save and restore environment variables, which means it can transfer them between different shells. like, one shell hands off the vibes, another shell picks them up. no cap. πŸ¦‹

command has to be one of these, and every single one of them slays in its own way:

  • clear β€” forget all stored variables. it's the memory-wipe era, we don't know her anymore. πŸ’€
  • eval β€” produce shell code for evaluation, restoring all saved variables. this is the main character right here. πŸ‘‘
  • list β€” list saved variables in a better readable format. pretty formatting, we love to see it. 🌈
  • save variable [value] β€” save variable either with its current shell value or with value. your choice, bestie, both are valid. πŸ’–
  • rm variable β€” remove variable from the store. bye bye, we hardly knew ye. πŸ™ˆ
lowkey a lil shortcut situation: only the first character of command is checked. so envstore e instead of envstore eval, envstore c for envstore clear, etc., are also valid. it's giving "we understood the assignment" energy. ✨

and for convenience, the options --version and --help are also supported. because obviously. πŸŽ€


🌿 ENVIRONMENT 🌿

  • ENVSTORE_FILE β€” the file in which the environment parameters are stored. it defaults to /tmp/envstore-EUID. that's where the magic lives. πŸ“

😭 LIMITATIONS 😭

okay so here's the part where we have to be real with each other:

  • variable names or values must not contain null bytes or newlines. just don't. 🚫
  • due to limitations imposed by most shells, it is not possible to save parameters containing more than one consecutive whitespace. envstore will save and display them correctly, but unless you do IFS trickery, your shell will not be able to load them. so it's not envstore's fault, it's the shell's fault, fr fr. πŸ’€
  • the current maximum length (in bytes) is 255 bytes for the variable name and 1023 bytes for its content. so keep it cute and concise. πŸ’…

🫢 AUTHOR 🫢

envstore was written by Daniel Friesel <derf@derf.homelinux.org>. πŸ‘‘

original idea and script by Maximilian Gass <mxey@ghosthacking.net>. πŸ’œ


🌈 SEE ALSO 🌈

  • envify(1) β€” go check it out, iykyk. ✨

and that's the whole page, bestie!! this little legend comes to you courtesy of Debian, dated December 1, 2009 β€” so yeah, it's been serving looks since 2009 and it still eats. no cap. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from