Skip to content

Node v12 REPL's function preview interacts poorly with shelljs #10

@nfischer

Description

@nfischer

It looks like node v12's REPL will run javascript code as you type it into the console. This has some annoying interactions with shelljs commands though because:

  1. these have side effects (ex. shell.clear() clears the console)
  2. n_shell has a feature to execute commands without typing parentheses (ex. ls<CR> is the same as ls()<CR>)

These combine to make for a really unpleasant user experience. Ex. typing touch (without pressing enter) will cause touch() to be eagerly executed by the REPL preview, which outputs an error (touch: no files given).

Maybe we should just disable the feature referenced in (2) and require parentheses. For some reason the node REPL won't show the preview for ls(), only for ls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions