diff --git a/README.md b/README.md index e61cab3..4f162eb 100644 --- a/README.md +++ b/README.md @@ -80,10 +80,12 @@ Bar the things. cmd config cmd config KEY cmd config KEY VALUE +cmd config KEY "" ``` 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 @@ -91,12 +93,28 @@ With no arguments outputs all the currently cached configuration settings. 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 be combined into the VALUE and written to a `values` file in the -standard configuration home location (Search for `XDG_CONFIG_HOME` for -more information). +configuration directory. + +### 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 @@ -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*