Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Zsh as Application Platform



Guys.

Idea
----

Zsh has one of the sweetest CLI interactors around.  Readline's chumpy.
Language-specific libs are weak+tedious+incomplete. The best hand-made
implementations will take a very long time to make and still probably
would never be as easily customized as zle.

So, can't we use zsh as the front-end for other tools, to much great
winning profit power?

Example: Pry
------------

Look at the great Ruby REPL, Pry ( http://pryrepl.org/ ).

It comes out of the box using readline, which is sort of nice because
readline is sort of nice. But it hits limits very quickly.  Check out
the gnarly hack used here to add just a single keybinding to the REPL: 
https://github.com/tpope/pry-editline/blob/master/lib/pry-editline.rb#L11

An alternative is provided via a pure-Ruby alternative, Coolline, but
it's implementation is not sophisticated (has no vi keys; hardcodes
terminal escape sequences), and ended up getting special handling
directly inside pry:
https://github.com/pry/pry/blob/master/lib/pry/pry_instance.rb#L605

So
---

Are there any tools that already do something like this?

I think I could start by simply making ^J/^M do something other than
accept-line (that is, send their buffer to another program via IPC), and
start working on custom completion. But, if there's prior art, I'd like
to study it first.

Thanks!
—☈



Messages sorted by: Reverse Date, Date, Thread, Author