Skip to content

Use REPL module #3

@piranna

Description

@piranna

By using the Node.js REPL module we get by free and heavily tested the readline and history and all the functionality available on the Node.js console, just would only need to set a custom eval() function to allow to instantiate system commands, but also we get a Javascript interpreter so we can use Javascript scripts and functions on the shell. For example, with some hacks, it would be feasable to do something like:

> ls -a  # Shell-like command
['.', '..']
> var a = ls('a')  // Javascript instruction
undefined
> console.log(a)
['.', '..']
> echo $a  // Echo would be an alias of console.log()
['.', '..']

The semantics would need a review, but but you can see what's the idea ;-)

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