jashkenas / coffeescript

Unfancy JavaScript
https://coffeescript.org/
MIT License
16.5k stars 1.98k forks source link

Proposal: REPL .editor command should open an actual editor and not simple, no-readline stdin #5115

Open sr105 opened 6 years ago

sr105 commented 6 years ago

The current REPL responds to .editor by reading stdin like running cat with no arguments. It would be a ton friendlier to open an editor like nano or vim and possibly respect the VISUAL and EDITOR environment variables. Alternatively, if the prompt supported multiline readline support like other REPLs, that would be nice, too.

CoffeeScript version 2.3.1 Node: v10.4.0

carlsmith commented 5 years ago

CoffeeScript is an ideal language for a system shell. You can create much more powerful one-liners with CoffeeScript than you can with bash, but you can also write nice, clear code in scripts. Having a modern interactive environment for CoffeeScript would be sweet. Python Prompt Toolkit is awesome for building modern shells and console apps, but it's Python.