1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-17 10:49:56 +00:00

Improve getline.

This commit is contained in:
Calvin Rose 2020-01-18 00:30:46 -06:00
parent 521a29446f
commit 9d8af7355f
2 changed files with 5 additions and 2 deletions

View File

@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file.
- Add `assert`
- Add `when-with`
- Add `if-with`
- Add completion to the default repl based on currently defined bindings.
- Fix thread module issue where sometimes decoding a message failed.
- Fix segfault regression when macros are called with bad arity.

View File

@ -648,8 +648,10 @@ static const JanetReg corelib_cfuns[] = {
},
{
"getline", janet_core_getline,
JDOC("(getline &opt prompt buf)\n\n"
"Reads a line of input into a buffer, including the newline character, using a prompt. Returns the modified buffer. "
JDOC("(getline &opt prompt buf env)\n\n"
"Reads a line of input into a buffer, including the newline character, using a prompt. "
"An optional environment table can be provided for autocomplete. "
"Returns the modified buffer. "
"Use this function to implement a simple interface for a terminal program.")
},
{