repl: fix tab completion for object properties with special characters#21556
repl: fix tab completion for object properties with special characters#21556starkwang wants to merge 1 commit intonodejs:masterfrom
Conversation
bb91120 to
c56417e
Compare
|
Would it be possible to generate proper tab completions for the other keys? I.e. autocomplete |
TimothyGu
left a comment
There was a problem hiding this comment.
You might find https://github.com/devsnek/node-repl-prototype/blob/5e72bed5a127c0b3e1c7289d75c3eb157db43522/src/repl.js#L154-L169 to be helpful to enhance the behavior for [ property references.
lib/repl.js
Outdated
There was a problem hiding this comment.
With acorn in tree, we could actually do something like
for higher accuracy.
@addaleax Rewrite the user input from |
The old RegExp will pass property names like `"hello world!"` when filtering the results of tab complete. This change is to fix it. Fixes: nodejs#21201
2a999a6 to
4443b61
Compare
|
CI before landing: https://ci.nodejs.org/job/node-test-pull-request/15704/ |
|
Landed in 4f15122 |
The old RegExp will pass property names like
"hello world!"when filtering the results of tab complete. This change is to fix it.By the way, now the repl module doesn't support tab complete like
obj[<tab>. Is there any plan for this?Fixes: #21201
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes