| Age | Commit message (Collapse) | Author |
|
The "share" project has been moved to SourceHut with new name
"pakakeh.go".
|
|
Previously, the "env-set" take the file argument as the last argument
and optional.
This changes move the file argument to the first argument so the bash
completion can detect and print the completion for list of keys.
While at it, fix handling key with quoted in EnvSet and EnvGet.
Closes: https://todo.sr.ht/~shulhan/awwan/10
|
|
The "env-keys" command print list of environment variables under a
directory.
This command is internal, not documented, used by bash completion.
|
|
The "file" argument is optional, its define path to environment file.
If its empty it will be set to "awwan.env" in the current directory.
|
|
The env-get command get the value from environment files.
Syntax,
----
<key> [dir]
----
The "key" argument define the key where value is stored in environment
using "section:sub:name" format.
The "dir" argument is optional, its define the directory where environment
files will be loaded, recursively, from BaseDir to dir.
If its empty default to the current directory.
|
|
The env-set command set the value of environment file. Syntax,
<file> <key> <value>
The "file" argument define path to environment file.
The "key" argument define the key to be set using "section:sub:name"
format.
The "value" argument define the value key.
For example, to set the value for "name" under section "host" to
"myhost" in file "awwan.env" run
$ awwan env-set awwan.env host::name myhost
To set the value for key "pass" under section "user" subsection "database"
to value "s3cret" in file "awwan.env" run
$ awwan env-set awwan.env user:database:pass s3cret
|