You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we just have one of these, for exiting, available via exit, quit, etc.
It might be nice to have more of these. One example, from Giles Bowkett on twitter, would be the history, similar to what bash has. <Ctrl-r>/<Ctrl-s> (in v0.2.0) are nice but this would be handy too (e.g. run stats in clojure on what commands are most common?)
I'm assuming there are other use cases as well (debugger? swapping out completion lib? panic button+reset to start state?), so would like to make this extensible.
Goals:
Make commands easy to call.
Make it easy to discover what the various commands are.
Make it easy to add new commands.
Don't take all the good names away from users, e.g. currently if a user has a var called exit, they can't eval it by typing it [alone] on a line and pressing enter. This will seem broken, and more commands means more likelihood of brokenness.
Problem to overcome:
Evaluation of these commands actually must happen on the client side of the nREPL, which prevents us from using the typical clojure namespacing mechanisms to separate bits of functionality. For the history feature, for example, we need execution on the client because the client is where jline executes & writes to the history file.
Half-baked ideas:
Using a syntax that is actually illegal clojure would prevent clashes w/ user code (at the cost of being a bit weird-looking).
Using a special keypress to get you into a command mode would aid discoverability (but hurt ease of calling).
Could it this be an nREPL middleware on the client side of the connection? Is that even something you can do w/ nREPL middleware?
The text was updated successfully, but these errors were encountered:
Erlang's Eshell uses ^G (CTRL+G) to go into "User switch command" mode, where you can call things like quit, connect to other shells, start remote shells etc. Maybe it would be interesting to put exit and quit in a similar thing to avoid them to shadow actual functions named that?
Currently we just have one of these, for exiting, available via
exit
,quit
, etc.It might be nice to have more of these. One example, from Giles Bowkett on twitter, would be the
history
, similar to what bash has.<Ctrl-r>
/<Ctrl-s>
(in v0.2.0) are nice but this would be handy too (e.g. run stats in clojure on what commands are most common?)I'm assuming there are other use cases as well (debugger? swapping out completion lib? panic button+reset to start state?), so would like to make this extensible.
Goals:
exit
, they can't eval it by typing it [alone] on a line and pressing enter. This will seem broken, and more commands means more likelihood of brokenness.Problem to overcome:
Evaluation of these commands actually must happen on the client side of the nREPL, which prevents us from using the typical clojure namespacing mechanisms to separate bits of functionality. For the history feature, for example, we need execution on the client because the client is where jline executes & writes to the history file.
Half-baked ideas:
The text was updated successfully, but these errors were encountered: