Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
arturoherrero committed May 2, 2016
1 parent 9ba3470 commit cb7bf3a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 25 deletions.
63 changes: 43 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,81 @@
[![Code Climate](https://codeclimate.com/github/arturoherrero/gvar/badges/gpa.svg)](https://codeclimate.com/github/arturoherrero/gvar)
[![Build Status](https://travis-ci.org/arturoherrero/gvar.svg?branch=master)](https://travis-ci.org/arturoherrero/gvar)

`gvar` - display, set, or remove global variables.
gvar(1) -- display, set, or remove global variables*.

<sub>* 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.</sub>


## 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.
of data. The records are stored in the user's home directory as `~/.gvar` file.


## Installation

1. Clone this repository:
Clone this repository:

$ git clone [email protected]:arturoherrero/gvar.git
```shell
$ git clone [email protected]:arturoherrero/gvar.git
```

2. Add `gvar/bin/` to your `PATH`:
Add `gvar/bin/` to your `PATH`:

$ echo 'export PATH="${PATH}:path/to/gvar/bin"' >> ~/.bash_profile
```shell
$ echo 'export PATH="${PATH}:path/to/gvar/bin"' >> ~/.bash_profile
```

3. Source your profile
Source your profile:

$ source ~/.bash_profile
```shell
$ source ~/.bash_profile
```


## Usage

To print out the names and values of all the global variables, use:

$ gvar
```shell
$ gvar
```

To set global variables, use arguments of the form <VARIABLE>=<VALUE>,
setting variable <VARIABLE> to value <VALUE>:
To set global variables, use arguments of the form `<VARIABLE>=<VALUE>`,
setting variable `<VARIABLE>` to value `<VALUE>`:

$ gvar VARIABLE=VALUE
```shell
$ gvar VARIABLE=VALUE
```

Setting a global variable to an empty value is different from unsetting it:

$ gvar VARIABLE=
```shell
$ gvar VARIABLE=
```

To print the value of the global variable <VARIABLE>, use:
To print the value of the global variable `<VARIABLE>`, use:

$ gvar VARIABLE
```shell
$ gvar VARIABLE
```

To remove (unset) a global variable <VARIABLE>, use:
To remove (unset) a global variable `<VARIABLE>`, use:

$ gvar -u VARIABLE
$ gvar --unset=VARIABLE
```shell
$ gvar -u VARIABLE
$ gvar --unset=VARIABLE
```

To delete the environment, removing all the global variables, use:

$ gvar -d
$ gvar --delete-environment
```shell
$ gvar -d
$ gvar --delete-environment
```


## Who made this?
Expand Down
4 changes: 2 additions & 2 deletions man/gvar.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GVAR" "1" "April 2016" "" ""
.TH "GVAR" "1" "May 2016" "" ""
.
.SH "NAME"
\fBgvar\fR \- display, set, or remove global variables
Expand All @@ -22,7 +22,7 @@
\fBgvar\fR \fB\-v\fR | \fB\-\-version\fR
.
.SH "DESCRIPTION"
\fBgvar\fR 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\.
\fBgvar\fR 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 \fB~/\.gvar\fR file\.
.
.SH "OPTIONS"
The following options are available:
Expand Down
4 changes: 2 additions & 2 deletions man/gvar.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/gvar.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gvar(1) -- display, set, or remove global variables
## 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.
of data. The records are stored in the user's home directory as `~/.gvar` file.


## OPTIONS
Expand Down

0 comments on commit cb7bf3a

Please sign in to comment.