aboutsummaryrefslogtreecommitdiff
path: root/_wui/doc
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-01-16 22:00:38 +0700
committerShulhan <ms@kilabit.info>2024-01-16 22:22:19 +0700
commit71b40922e6b6cc4f2d4b3fa94cbe586720bf6f8c (patch)
treee66171fb37dd51af1ac1b09beb02339b4f66ed92 /_wui/doc
parenta1339c8b1fb34d272426f97ca42cecd7971e627c (diff)
downloadawwan-71b40922e6b6cc4f2d4b3fa94cbe586720bf6f8c.tar.xz
all: refactoring "env-set" arguments
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
Diffstat (limited to '_wui/doc')
-rw-r--r--_wui/doc/awwan.adoc15
1 files changed, 7 insertions, 8 deletions
diff --git a/_wui/doc/awwan.adoc b/_wui/doc/awwan.adoc
index cc1f532..07dfbcb 100644
--- a/_wui/doc/awwan.adoc
+++ b/_wui/doc/awwan.adoc
@@ -27,7 +27,7 @@ command = "decrypt" / "encrypt" / "help" / "local" / "play" / "serve"
env-get <dir> <key>
Get the value from environment based on the key.
- env-set <key> <value> [env-file]
+ env-set <env-file> <key> <value>
Set the value in environment file based on the key.
help
@@ -159,20 +159,19 @@ The env-set command set the value of environment file.
Syntax,
----
-<key> <value> [env-file]
+<env-file> <key> <value>
----
-The "key" argument define the key to be set using "section:sub:name" format.
+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 of the key.
-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.
-
For example, to set the value for "name" under section "host" to "myhost" in
file "awwan.env" run
----
-$ awwan env-set host::name myhost
+$ awwan env-set awwan.env host::name myhost
$ cat awwan.env
[host]
name = myhost
@@ -182,7 +181,7 @@ To set the value for key "pass" under section "user" subsection "database"
to value "s3cret" in file ".awwan.env" run
----
-$ awwan env-set user:database:pass s3cret .awwan.env
+$ awwan env-set .awwan.env user:database:pass s3cret
$ cat .awwan.env
[user "database"]
pass = s3cret