Arguments
Argument names are snake_case. A hyphenated name is an error that says the new one: max-tokens is max_tokens, must-exist is must_exist, new-page is new_page, on-click is on_click. (On an HTML tag in a page, on-click keeps HTML's hyphen.)
| Statement | Before | Now |
|---|---|---|
input, picker, menu, confirm, llm, capture, config, call |
to: name |
into: name: the variable a result goes into. to is only ever a destination |
for, menu |
index: i |
at: i (for item at i in $list) |
import, include, layout, Markdown, Figure, Bibliography |
src |
path |
type |
sample |
path |
Table (KScript.Document) |
data, headers, align: "lrr" |
rows, columns: { Name: 'name' }, align: ['left', 'right'], as in a terminal table |
wait |
ms, seconds |
duration: 500ms, or the value on its own: wait(500ms) |
test |
each, in, index |
a for loop round the test (above) |
@color, log_provider |
colour |
color |