qrlkit 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -360,6 +360,46 @@ qrlkit greet Hey
|
|
|
360
360
|
|
|
361
361
|
Supported shells: `bash`, `sh`, and `zsh`.
|
|
362
362
|
|
|
363
|
+
### Arguments
|
|
364
|
+
|
|
365
|
+
Prompt for text or pick one allowed value.
|
|
366
|
+
|
|
367
|
+
```toml
|
|
368
|
+
[greet]
|
|
369
|
+
args = [
|
|
370
|
+
{ name = "name" },
|
|
371
|
+
{ name = "greeting", enum = ["Hello", "Hi", "Hey"] },
|
|
372
|
+
]
|
|
373
|
+
run = 'printf "%s, %s!\n" "$2" "$1"'
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
```sh
|
|
377
|
+
greet # Prompt for both
|
|
378
|
+
greet Ada # Choose a greeting
|
|
379
|
+
greet Ada Hi # Use both directly
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
Scripts use `"$1"`, `"$2"`, etc. in `args` order. URLs and paths use `{name}`.
|
|
383
|
+
Reuse a list with `enum = { ref = "shared.greetings" }`.
|
|
384
|
+
|
|
385
|
+
Select several values with `multiple = true` and a nonempty `join` separator.
|
|
386
|
+
|
|
387
|
+
```toml
|
|
388
|
+
[dashboard]
|
|
389
|
+
args = [
|
|
390
|
+
{ name = "regions", enum = ["eu", "us", "asia"], multiple = true, join = "," },
|
|
391
|
+
]
|
|
392
|
+
url = "https://dashboard.example.com/?regions={regions}"
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
```sh
|
|
396
|
+
dashboard # Space toggles, Enter confirms at least one
|
|
397
|
+
dashboard eu,asia # Supply the joined value directly
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
Interactive selections follow list order and become one value: `eu,asia`.
|
|
401
|
+
Values are URL-encoded in URLs. Choices must not conflict with the separator.
|
|
402
|
+
|
|
363
403
|
### Shared values
|
|
364
404
|
|
|
365
405
|
Put shared values in any config and register it with `qrlkit add`.
|
|
@@ -394,7 +434,7 @@ NAME = "{shared.name}"
|
|
|
394
434
|
|
|
395
435
|
`qrlkit` offers a few ways to compose one QRL from multiple others. First principle is that everything is callable and referenceable if its not `hidden = true`.
|
|
396
436
|
|
|
397
|
-
**
|
|
437
|
+
**One QRL calls another**
|
|
398
438
|
```
|
|
399
439
|
[qrl-1]
|
|
400
440
|
url = "https:/..."
|
|
@@ -407,7 +447,7 @@ url = "{qrl-1}/{qrl-1.qrl-2}"
|
|
|
407
447
|
```
|
|
408
448
|
Not here its possible to chain keys with a dot like `objs.fruits.apples`.
|
|
409
449
|
|
|
410
|
-
**
|
|
450
|
+
**Group static fields and ref them**
|
|
411
451
|
|
|
412
452
|
```toml
|
|
413
453
|
[args]
|
package/package.json
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"README.md"
|
|
10
10
|
],
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"qrlkit-darwin-arm64": "0.
|
|
13
|
-
"qrlkit-darwin-x64": "0.
|
|
14
|
-
"qrlkit-linux-arm64": "0.
|
|
15
|
-
"qrlkit-linux-x64": "0.
|
|
12
|
+
"qrlkit-darwin-arm64": "0.14.0",
|
|
13
|
+
"qrlkit-darwin-x64": "0.14.0",
|
|
14
|
+
"qrlkit-linux-arm64": "0.14.0",
|
|
15
|
+
"qrlkit-linux-x64": "0.14.0"
|
|
16
16
|
},
|
|
17
17
|
"os": [
|
|
18
18
|
"linux",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/qrlkit/qrlkit-rs/issues"
|
|
36
36
|
},
|
|
37
|
-
"version": "0.
|
|
37
|
+
"version": "0.14.0"
|
|
38
38
|
}
|