Update README.md

This commit is contained in:
rwxrob 2021-08-25 00:52:39 -04:00
parent cc987dbc7a
commit 7c67b896b7
No known key found for this signature in database
GPG Key ID: 1CCACEDD2F65578E
1 changed files with 23 additions and 5 deletions

View File

@ -80,10 +80,12 @@ Bar the things.
cmd config cmd config
cmd config KEY cmd config KEY
cmd config KEY VALUE cmd config KEY VALUE
cmd config KEY ""
``` ```
The `config` command is for reading, writing, and displaying standard The `config` command is for reading, writing, and displaying standard
open desktop configuration properties. open desktop configuration properties. Pass an empty string to delete
a property.
### Arguments ### Arguments
@ -91,12 +93,28 @@ With no arguments outputs all the currently cached configuration
settings. settings.
With a single KEY argument fetches the value for that key and outputs With a single KEY argument fetches the value for that key and outputs
it. it. The special `dir` KEY is reserved and always outputs the full path
to the current configuration directory containing the `values` file. The
special `path` KEY is reserved and always outputs the full path to the
`values` file itself.
With more than one argument the remaining arguments after the KEY will With more than one argument the remaining arguments after the KEY will
be combined into the VALUE and written to a `values` file in the be combined into the VALUE and written to a `values` file in the
standard configuration home location (Search for `XDG_CONFIG_HOME` for configuration directory.
more information).
### Configuration Directory
The configuration directory path relies on the following environment
variables:
* `EXE` - defaults to name of currently running command (cmd)
* `HOME` - checked for `$HOME/.config/$EXE/values`
* `XDG_CONFIG_HOME` - overrides `$HOME/.config`
* `CONFIG_DIR` - full path to directory containing `values` file
The `CONFIG_DIR` always takes priority over anything else if set, but is
never implied. If the directory does not exist it will be created the
first time a value is set.
### Configuration `values` File Format ### Configuration `values` File Format
@ -161,5 +179,5 @@ Displays a summary of usage.
---- ----
*Autogenerated Mon Aug 23 10:26:57 PM EDT 2021* *Autogenerated Wed Aug 25 12:52:34 AM EDT 2021*