mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 15:30:56 +01:00
add $ to variable name character matching patterns in repl completer
This commit is contained in:
parent
634c4bf0b0
commit
ae87007478
@ -266,8 +266,8 @@ REPLServer.prototype.complete = function (line) {
|
||||
// spam.eggs.<|> # completions for 'spam.eggs' with filter ''
|
||||
// foo<|> # all scope vars with filter 'foo'
|
||||
// foo.<|> # completions for 'foo' with filter ''
|
||||
else if (line.length === 0 || line[line.length-1].match(/\w|\./)) {
|
||||
var simpleExpressionPat = /(([a-zA-Z_]\w*)\.)*([a-zA-Z_]\w*)\.?$/;
|
||||
else if (line.length === 0 || line[line.length-1].match(/\w|\.|\$/)) {
|
||||
var simpleExpressionPat = /(([a-zA-Z_$](?:\w|\$)*)\.)*([a-zA-Z_$](?:\w|\$)*)\.?$/;
|
||||
match = simpleExpressionPat.exec(line);
|
||||
if (line.length === 0 || match) {
|
||||
var expr;
|
||||
|
Loading…
Reference in New Issue
Block a user