node icon indicating copy to clipboard operation
node copied to clipboard

repl: /x/dg is autocompleted to bogus /x/dgram

Open bnoordhuis opened this issue 2 years ago • 4 comments

v21.2.0

$ node 
Welcome to Node.js v21.2.0.
Type ".help" for more information.
> /x/dg
/x/dgram
^

Uncaught SyntaxError: Invalid regular expression flags
> 

IOW, the REPL autocompletes /x/dg<CR> to /x/dgram.

bnoordhuis avatar Nov 17 '23 10:11 bnoordhuis

This mainly requires more fine granular suggestions. Regular expressions can definitely be handled better and this also applies to e.g., not suggesting top level modules as property (/a/.dg).

BridgeAR avatar Nov 17 '23 14:11 BridgeAR

@nodejs/repl

MrJithil avatar Nov 18 '23 04:11 MrJithil

The auto-suggest feature looks a bit weird right now, is this expected?

I think the suggested content should require confirmation before use. For example, if I input dg and then press Enter directly, I expect to execute dg, not dgram.

xsbchen avatar Jan 17 '24 07:01 xsbchen

The auto-suggest feature looks a bit weird right now, is this expected?

I think the suggested content should require confirmation before use. For example, if I input dg and then press Enter directly, I expect to execute dg, not dgram.

echo. IMO auto completion should be done by a "TAB".

lucshi avatar Apr 29 '24 08:04 lucshi