mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
lightning-cli: document the real argument handling (for special effects).
And fix it to pass through decimals like the man page promises! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
356514c753
commit
d95ea51a73
@ -276,7 +276,7 @@ static bool is_literal(const char *arg)
|
|||||||
if (arglen == 0) {
|
if (arglen == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return strspn(arg, "0123456789") == arglen
|
return strspn(arg, "0123456789.") == arglen
|
||||||
|| streq(arg, "true")
|
|| streq(arg, "true")
|
||||||
|| streq(arg, "false")
|
|| streq(arg, "false")
|
||||||
|| streq(arg, "null")
|
|| streq(arg, "null")
|
||||||
|
@ -89,7 +89,8 @@ this is to avoid having lightningd intrepret the position of an arguement.
|
|||||||
|
|
||||||
Arguments may be integer numbers (composed entirely of digits), floating-point
|
Arguments may be integer numbers (composed entirely of digits), floating-point
|
||||||
numbers (has a radix point but otherwise composed of digits), *true*, *false*,
|
numbers (has a radix point but otherwise composed of digits), *true*, *false*,
|
||||||
or *null*. Other arguments are treated as strings.
|
or *null*. Arguments which begin with *{*, *[* or *"* are also considered
|
||||||
|
raw JSON and are passed through. Other arguments are treated as strings.
|
||||||
|
|
||||||
Some commands have optional arguments. You may use *null* to skip
|
Some commands have optional arguments. You may use *null* to skip
|
||||||
optional arguments to provide later arguments, although this is not encouraged.
|
optional arguments to provide later arguments, although this is not encouraged.
|
||||||
|
Loading…
Reference in New Issue
Block a user