gvar
gvar(1) -- display, set, or remove global variables*.
* When I say global variable, I refer to a key-value pair that you can read/write at any time in any terminal session. You can think this is similar to the environment variables because it's a set of dynamic-named values but they are not session-wide or system-wide related.
Description
gvar is a pure Bash key-value store where each user has a different collection
of data. The records are stored in the user's home directory as ~/.gvar file.
Installation
Clone this repository:
$ git clone [email protected]:arturoherrero/gvar.gitAdd gvar/bin/ to your PATH:
$ echo 'export PATH="${PATH}:path/to/gvar/bin"' >> ~/.bash_profileSource your profile:
$ source ~/.bash_profileOS X
$ brew tap arturoherrero/formulae
$ brew install gvarUsage
To print out the names and values of all the global variables, use:
$ gvarTo set global variables, use arguments of the form <VARIABLE>=<VALUE>,
setting variable <VARIABLE> to value <VALUE>:
$ gvar VARIABLE=VALUESetting a global variable to an empty value is different from unsetting it:
$ gvar VARIABLE=To print the value of the global variable <VARIABLE>, use:
$ gvar VARIABLETo remove (unset) a global variable <VARIABLE>, use:
$ gvar -u VARIABLE
$ gvar --unset=VARIABLETo delete the environment, removing all the global variables, use:
$ gvar -d
$ gvar --delete-environmentWho made this?
This was made by Arturo Herrero under the MIT License. Find me on Twitter @ArturoHerrero.
