Skip to content

Commit 04283d6

Browse files
committed
a comment
1 parent f90955b commit 04283d6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

cli/repl.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,17 @@ repl_print_result(const struct resulttype *rt, const struct val *vals)
676676
int
677677
unescape(char *p0, size_t *lenp)
678678
{
679-
/* unescape string like "\xe1\xba\x9b" in-place */
680-
679+
/*
680+
* unescape string like "\xe1\xba\x9b" in-place.
681+
*
682+
* Note: quote support here is an incomplete hack to allow
683+
* passing an empty name ("") on the repl prompt. (the spec
684+
* test has a case to examine zero-length name, which is
685+
* spec-wise valid.)
686+
* Because repl itself uses simple strtok to parse the input,
687+
* things like "a b" don't work on the prompt as you might
688+
* expect. "a\x20b" can work better.
689+
*/
681690
bool in_quote = false;
682691
char *p = p0;
683692
char *wp = p;

0 commit comments

Comments
 (0)