Tweak some help text.
This commit is contained in:
parent
857219a4e8
commit
32a2254da9
|
@ -599,8 +599,9 @@ int _readFile(FILE* input, struct Environment* env)
|
|||
void repl(struct Environment* env)
|
||||
{
|
||||
char* buf;
|
||||
using_history();
|
||||
Object prompt;
|
||||
using_history();
|
||||
|
||||
while ((buf = readline((prompt = fetchFromEnvironment("prompt", env)).string)) != NULL) {
|
||||
cleanObject(&prompt);
|
||||
if (strcmp("q", buf) == 0) {
|
||||
|
@ -617,14 +618,14 @@ void repl(struct Environment* env)
|
|||
free(oldBuf);
|
||||
}
|
||||
Object o = parseEval(buf, env);
|
||||
free(buf);
|
||||
|
||||
size_t length;
|
||||
char *output = stringObj(&o, &length);
|
||||
printColored(output);
|
||||
printf("[0m\n");
|
||||
|
||||
cleanObject(&o);
|
||||
printColored(output);
|
||||
free(output);
|
||||
free(buf);
|
||||
printf("[0m\n");
|
||||
}
|
||||
cleanObject(&prompt);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ BASIC_OP(or);
|
|||
|
||||
tfn(catObjects,
|
||||
({ NULL, isStringy }),
|
||||
"Concatenate string versions of the given objects.",
|
||||
"Concatenate string representations of the given objects.",
|
||||
"(cat \"Stuff: \" (1 2 3))", "Stuff: ( 1 2 3 )",
|
||||
);
|
||||
|
||||
|
@ -55,7 +55,7 @@ tfn(prepend,
|
|||
|
||||
tfn(len,
|
||||
({ isListy, isNumber }),
|
||||
"Returns the length of the given list, or a NOT_A_LIST error if the expression is not a list.",
|
||||
"Returns the length of the given list, or an error if the expression is not a list.",
|
||||
"(len (2 3))", "2",
|
||||
"(len ())", "0",
|
||||
"(len \"string\")", "BAD_PARAMS_ON: len",
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
|
||||
fn(startServer,
|
||||
"(serve) => 0\n"
|
||||
"Starts a simple web server with routes that have been added with (get) and (post).\n"
|
||||
"Starts a simple web server with routes that have been added using (get) and (post).\n"
|
||||
"Returns 0 if the server was successfully started, otherwise 1.\n"
|
||||
"Note: This is a non-blocking call. It is recommended to wait for some input before exiting.\n"
|
||||
" A simple way would be to use (inp) immediately after the (serve) call."
|
||||
"Note: Not a blocking call! Calling (inp) is a simple way to keep the server open.\n"
|
||||
);
|
||||
|
||||
fn(addGetRoute,
|
||||
|
|
Loading…
Reference in New Issue