aboutsummaryrefslogtreecommitdiff
path: root/awwan_env_test.go
AgeCommit message (Collapse)Author
2024-03-22all: replace module "share" with "pakakeh.go"Shulhan
The "share" project has been moved to SourceHut with new name "pakakeh.go".
2024-01-16all: refactoring "env-set" argumentsShulhan
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
2024-01-16all: add command env-keysShulhan
The "env-keys" command print list of environment variables under a directory. This command is internal, not documented, used by bash completion.
2023-11-17all: move the file argument in env-set to the last argumentShulhan
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.
2023-11-17all: implement command "env-get" to get value from environment filesShulhan
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.
2023-11-17all: implement command to set environment value with "env-set"Shulhan
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