From 9d8af7355fef9ce17f8118aa98b3ace5927deb8f Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sat, 18 Jan 2020 00:30:46 -0600 Subject: [PATCH] Improve getline. --- CHANGELOG.md | 1 + src/core/corelib.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b3e570a..83f54f83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/core/corelib.c b/src/core/corelib.c index 683c5b68..b204ec0c 100644 --- a/src/core/corelib.c +++ b/src/core/corelib.c @@ -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.") }, {