Analog to utop’s accept-current-phrase
llelf opened this issue · comments
utop
has a UTop.end_and_accept_current_phrase
command. What it basically does is “send ;;
\n
without displaying them”.
You can bind¹ to, say, Meta-ENTER and it’s quite handy.
¹) e. g.
#require "lambda-term";;
LTerm_read_line.bind
[ { control = false; meta = true; shift = false; code = Enter } ]
[ UTop.end_and_accept_current_phrase ]
;;
What's the use of not displaying them ? What's written in the history then ?
In fact I was not aware you could capture Meta-ENTER
. I may actually prefer to use it for this.
But that doesn't prevent of providing what you suggest under another binding.
@dbuenzli just for the looks, they are written in the history. Not displaying them is not important I guess.
Ok thanks for the answer. I think I rather not make what is different in history than what you can see in the "displayed history" so I think I would opt to make the append visible.
Also could you please do
# Down.Private.tty_test ();;
and hit your M-enter
and report me what is displayed.
M-\x0D
(macOS’ Terminal.app)
https://gist.github.com/hcarty/b2dab5324d0d4344d771
👍 Got used to not typing/seeing ;;
(alt+enter for multi-line without accept if needed).