You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tab completion for block-scoped variables doesn't work in REPL #983
confirmed-bugIssues and PRs for confirmed bugs.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.replIssues and PRs related to the REPL subsystem.
Using version 1.4.1 REPL mode, it seems that tab completion for block-scoped variables (i.e. let and const statements) doesn't show suggestions, while tab completion for variables declared with var or otherwise just assigned a value without a deceleration, does show up a list of suggestions.
Of course, this happens in strict mode, or else I couldn't use let and const.
Can confirm that tab completion isn't working for const or let for me in the latest release (v6.2.2), but interestingly, const (but not let) works in v5.11.1.
I'll check what the debugger does, since it works there.
If that doesn't work for us, here's a workaround we might try: Since vm intercepts all variable declarations anyways (and REPL sends everything through vm), we could also store the variable names in a list, and then do tab completion using that list. /cc @AnnaMag
confirmed-bugIssues and PRs for confirmed bugs.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.replIssues and PRs related to the REPL subsystem.
Activity
cjihrig commentedon Apr 2, 2016
Is this actually closed? Tab completion of
letandconstvariables isn't working for me.philj0st commentedon May 29, 2016
neither is it for me. I'm on node v6.2.0
bnoordhuis commentedon May 30, 2016
I'll reopen, it doesn't work with master either.
kaicataldo commentedon Jun 25, 2016
Can confirm that tab completion isn't working for
constorletfor me in the latest release (v6.2.2), but interestingly,const(but notlet) works in v5.11.1.Fishrock123 commentedon Sep 17, 2016
Anyone know if there is a way to hook into what variables are in the current scope? VM hacks count.
Would running in/hooking into a new
vmmodule context have this info?addaleax commentedon Sep 17, 2016
@nodejs/v8?
bnoordhuis commentedon Sep 18, 2016
You can through the debugger API but you have to fake a breakpoint.
Interestingly though, tab completion for let and const bindings seems to work with master.
targos commentedon Sep 20, 2016
It doesn't seem to work for me. What did you try ?
Fishrock123 commentedon Oct 18, 2016
Just confirmed this still doesn't work on
master.Fishrock123 commentedon Oct 18, 2016
cc @fhinkel
fhinkel commentedon Oct 18, 2016
I'll check what the debugger does, since it works there.
If that doesn't work for us, here's a workaround we might try: Since vm intercepts all variable declarations anyways (and REPL sends everything through vm), we could also store the variable names in a list, and then do tab completion using that list. /cc @AnnaMag
Fishrock123 commentedon Nov 8, 2016
ping @fhinkel did you get anywhere here?
fhinkel commentedon Nov 23, 2016
Sorry, didn't get too much time on this yet.
Fishrock123 commentedon Mar 24, 2017
ping @fhinkel, were you ever able to look into this? :D
robahl commentedon May 22, 2017
Help us @fhinkel, you're our only hope!
jasnell commentedon May 30, 2017
This appears to no longer be an issue.
targos commentedon May 30, 2017
@jasnell I think it's still an issue. Note that Chrome devtools are also unable to provide completion for
letorconstvariables.jasnell commentedon May 30, 2017
hmm.... yep, quick verification test shows that I was testing the wrong thing. Thanks for reopening @targos
jgranduel commentedon Sep 21, 2017
Hi,
node-8.5.0 REPL win10... seems to still be an issue. Any news?
repl: show lexically scoped vars in tab completion
repl: show lexically scoped vars in tab completion
repl: show lexically scoped vars in tab completion
repl: show lexically scoped vars in tab completion
repl: show lexically scoped vars in tab completion