From cb7bf3ac56d1073422d666d3bdbe178d83edb637 Mon Sep 17 00:00:00 2001 From: Arturo Herrero Date: Mon, 2 May 2016 23:40:16 +0100 Subject: [PATCH] Update readme --- README.md | 63 +++++++++++++++++++++++++++++++++---------------- man/gvar.1 | 4 ++-- man/gvar.1.html | 4 ++-- man/gvar.1.ronn | 2 +- 4 files changed, 48 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 9344d8f..a9327fd 100644 --- a/README.md +++ b/README.md @@ -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*. + +* 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. +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 git@github.com:arturoherrero/gvar.git +```shell +$ git clone git@github.com: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 =, -setting variable to value : +To set global variables, use arguments of the form `=`, +setting variable `` to 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 , use: +To print the value of the global variable ``, use: - $ gvar VARIABLE +```shell +$ gvar VARIABLE +``` -To remove (unset) a global variable , use: +To remove (unset) a global 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? diff --git a/man/gvar.1 b/man/gvar.1 index 73bd4d3..e79cbdd 100644 --- a/man/gvar.1 +++ b/man/gvar.1 @@ -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 @@ -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: diff --git a/man/gvar.1.html b/man/gvar.1.html index 8170621..17e0918 100644 --- a/man/gvar.1.html +++ b/man/gvar.1.html @@ -84,7 +84,7 @@

SYNOPSIS

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

@@ -144,7 +144,7 @@
  1. -
  2. April 2016
  3. +
  4. May 2016
  5. gvar(1)
diff --git a/man/gvar.1.ronn b/man/gvar.1.ronn index c428c2a..9ccbd81 100644 --- a/man/gvar.1.ronn +++ b/man/gvar.1.ronn @@ -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