Skip to content

repl: Extra / on completion after require #33238

Closed
@coreyfarrell

Description

@coreyfarrell
  • Version: v14.1.0
  • Platform: Linux lt2.cfware.com 5.5.10-100.fc30.x86_64 deps: update openssl to 1.0.1j #1 SMP Wed Mar 18 14:34:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: REPL

What steps will reproduce the bug?

Install a package that has sub-directories (lets say nano for an example). Run repl with node and type require('nano without the closing quote:
Screenshot from 2020-05-04 14-29-04

Note the position of the cursor and the suggested /, this is valid. Typing ') to close the require call does not remove the suggested /. At this point pressing keyboard left, end or tab causes an additional / to be displayed.

Typing require('nano/') then pressing tab causes nano/lib/ and nano/package to be suggested.

How often does it reproduce? Is there a required condition?

Every time.

What is the expected behavior?

Completion of the string passed to require() should end as soon as the closing ' is typed.

What do you see instead?

Screenshot from 2020-05-04 14-40-51

Additional information

Sorry for using screen-captures it's difficult to show what I'm seeing otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions