2
2
zrcadlo https://github.com/Hilbis/Hilbish synchronizováno 2025-07-18 16:52:02 +00:00

docs(commander): detail about sinks.input

Tento commit je obsažen v:
sammyette 2024-04-27 20:30:47 -04:00
rodič 50bfa14fe8
revize 75c3b95517
Podepsáno: sammyette
ID GPG klíče: 904FC49417B44DCD

Zobrazit soubor

@ -17,8 +17,11 @@ In this example, a command with the name of `hello` is created
that will print `Hello world!` to output. One question you may that will print `Hello world!` to output. One question you may
have is: What is the `sinks` parameter? have is: What is the `sinks` parameter?
The `sinks` parameter is a table with 3 keys: `in`, `out`, The `sinks` parameter is a table with 3 keys: `input`, `out`, and `err`.
and `err`. All of them are a @Sink. There is an `in` alias to `input`, but it requires using the string accessor syntax (`sinks['in']`)
as `in` is also a Lua keyword, so `input` is preferred for use.
All of them are a @Sink.
In the future, `sinks.in` will be removed.
- `in` is the standard input. - `in` is the standard input.
You may use the read functions on this sink to get input from the user. You may use the read functions on this sink to get input from the user.